-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknapsack.config.js
66 lines (62 loc) · 1.55 KB
/
knapsack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const { configureKnapsack } = require('@knapsack/app');
const { join } = require('path');
// React
const webpack = require('webpack');
const babelConfig = require('@knapsack/babel-config/es');
// Other renderers
const { KnapsackReactRenderer } = require('@knapsack/renderer-react');
const HTMLRenderer = require('@knapsack/renderer-html');
const {
KnapsackWebComponentRenderer,
} = require('@knapsack/renderer-web-components');
// Other config
const {
configure: configureChangelogMd,
} = require('@knapsack/plugin-changelog-md');
const { version } = require('./lerna.json');
const DesignTokenDir = join(__dirname, './packages/design-tokens/dist');
module.exports = configureKnapsack({
designTokens: {
createCodeSnippet: (token) => `$${token.name}`,
distDir: DesignTokenDir,
targets: {
android: {
enabled: true,
},
css: {
enabled: true,
},
ios: {
enabled: true,
},
js: {
enabled: true,
},
},
},
dist: './dist',
public: join(__dirname, 'ks-public/'),
data: './data',
version,
templateRenderers: [
new KnapsackReactRenderer({
webpackConfig: {},
webpack,
babelConfig,
demoWrapperPath: join(__dirname, './packages/react/dist/demo-wrapper.js'),
}),
new HTMLRenderer(),
new KnapsackWebComponentRenderer(),
],
plugins: [
configureChangelogMd({
changelogPath: './CHANGELOG.md',
}),
],
cloud: {
siteId: 'public-demo',
repoName: 'public-demo',
repoOwner: 'knapsack-cloud',
baseBranch: 'main',
},
});