-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.cjs
67 lines (66 loc) · 2.15 KB
/
rollup.config.cjs
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
const typescript = require("rollup-plugin-typescript2");
const terser = require("@rollup/plugin-terser");
const {eslint} = require("rollup-plugin-eslint");
const postcss = require("rollup-plugin-postcss");
const stylelint = require("rollup-plugin-stylelint").default;
const reactSvg = require("rollup-plugin-react-svg");
const path = require("path");
module.exports = [
{
external: [
"react",
"react-dom",
"classnames",
"react-textarea-autosize",
"uuid",
"date-fns",
"date-fns/fp",
"date-fns/locale",
"date-fns-tz"
],
input: {
index: "src/index.ts",
FormField: "src/form/field/FormField.tsx",
Input: "src/form/input/Input.tsx",
NumberInput: "src/form/input/number/NumberInput.tsx",
PasswordInput: "src/form/password-input/PasswordInput.tsx",
Select: "src/select/Select.tsx",
FileInput: "src/form/input/file/FileInput.tsx",
Checkbox: "src/form/input/checkbox/CheckboxInput.tsx",
Radio: "src/form/input/radio/RadioInput.tsx",
RadioGroup: "src/form/input/radio/group/RadioGroup.tsx",
TypeaheadInput: "src/form/input/typeahead/TypeaheadInput.tsx",
TypeaheadSelect: "src/select/typeahead/TypeaheadSelect.tsx",
List: "src/list/List.tsx",
ListItem: "src/list/item/ListItem.tsx",
Button: "src/button/Button.tsx",
FileUploadButton: "src/button/file-upload/FileUploadButton.tsx",
Spinner: "src/spinner/Spinner.tsx",
Toast: "src/toast/Toast.tsx",
Textarea: "src/form/textarea/Textarea.tsx",
Toggle: "src/toggle/Toggle.tsx",
Switch: "src/switch/Switch.tsx",
ProgressBar: "src/progress-bar/ProgressBar.tsx",
TimeInput: "src/form/time-input/TimeInput.tsx",
DateTimer: "src/date-timer/DateTimer.tsx"
},
output: {
dir: "dist",
format: "cjs"
},
plugins: [
reactSvg(),
terser(),
eslint({
fix: true,
exclude: ["./src/**/**.scss", "./src/**/**.svg"]
}),
stylelint(),
postcss({extract: path.resolve("dist/main.css")}),
typescript({
exclude: ["**/__tests__/**", "node_modules"],
clean: true
})
]
}
];