-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.js
74 lines (72 loc) · 2.73 KB
/
build.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
67
68
69
70
71
72
73
74
const esbuild = require("esbuild");
const path = require("path");
const sassPlugin = require("esbuild-sass-plugin").sassPlugin;
//const postCssPlugin = require("esbuild-plugin-postcss2").default;
const postcss_svg = require('postcss-inline-svg');
const postcss = require("postcss");
esbuild.build({
entryPoints: {
'index': 'lib/index.ts',
'lwdc-action-bar': 'lib/lwdc-action-bar.ts',
'lwdc-banner': 'lib/lwdc-banner.ts',
'lwdc-breadcrumbs': 'lib/lwdc-breadcrumbs.ts',
'lwdc-button': 'lib/lwdc-button.ts',
'lwdc-card': 'lib/lwdc-card.ts',
'lwdc-checkbox': 'lib/lwdc-checkbox.ts',
'lwdc-color-input': 'lib/lwdc-color-input.ts',
'lwdc-combobox': 'lib/lwdc-combobox.ts',
'lwdc-core': 'lib/lwdc-core.ts',
'lwdc-count-badge': 'lib/lwdc-count-badge.ts',
'lwdc-env-label': 'lib/lwdc-env-label.ts',
'lwdc-file-upload': 'lib/lwdc-file-upload.ts',
'lwdc-fonts': 'lib/lwdc-fonts.ts',
'lwdc-form': 'lib/lwdc-form.ts',
'lwdc-form-field': 'lib/lwdc-form-field.ts',
'lwdc-header': 'lib/lwdc-header.ts',
'lwdc-icon': 'lib/lwdc-icon.ts',
'lwdc-icon-inject': 'lib/lwdc-icon-inject.ts',
'lwdc-layout-box': 'lib/lwdc-layout-box.ts',
'lwdc-layout-section': 'lib/lwdc-layout-section.ts',
'lwdc-loading': 'lib/lwdc-loading.ts',
'lwdc-menu-item': 'lib/lwdc-menu-item.ts',
'lwdc-menu': 'lib/lwdc-menu.ts',
'lwdc-modal': 'lib/lwdc-modal.ts',
'lwdc-page-header': 'lib/lwdc-page-header.ts',
'lwdc-pagination': 'lib/lwdc-pagination.ts',
'lwdc-popup': 'lib/lwdc-popup.ts',
'lwdc-progress': 'lib/lwdc-progress.ts',
'lwdc-radio': 'lib/lwdc-radio.ts',
'lwdc-search-bar': 'lib/lwdc-search-bar.ts',
'lwdc-select': 'lib/lwdc-select.ts',
'lwdc-side-panel': 'lib/lwdc-side-panel.ts',
'lwdc-status-indicator': 'lib/lwdc-status-indicator.ts',
'lwdc-switch': 'lib/lwdc-switch.ts',
'lwdc-table': 'lib/lwdc-table.ts',
'lwdc-tabs': 'lib/lwdc-tabs.ts',
'lwdc-text': 'lib/lwdc-text.ts',
'lwdc-textarea': 'lib/lwdc-textarea.ts',
'lwdc-toast': 'lib/lwdc-toast.ts',
'lwdc-tooltip': 'lib/lwdc-tooltip.ts',
},
format: 'esm',
outdir: 'wc',
bundle: true,
splitting: true,
sourcemap: 'external',
plugins: [
sassPlugin({
implementation: 'node-sass',
//wait for update to lit
//type: 'lit-css',
type: "css-text",
includePaths: [
path.resolve('node_modules'),
],
async transform(source, resolveDir) {
const {css} = await postcss([postcss_svg({paths:['wc']})]).process(source);
//console.log(css);
return css;
}
}),
],
}).catch((e) => console.error(e.message));