forked from guardian/prosemirror-noting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
50 lines (49 loc) · 1.02 KB
/
rollup.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
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import { eslint } from "rollup-plugin-eslint";
import scss from "rollup-plugin-scss";
import babel from "rollup-plugin-babel";
import dts from "rollup-plugin-dts";
export default [
{
input: "src/js/index.js",
output: {
file: "dist/noting.js",
format: "cjs",
},
plugins: [
scss({
output: "dist/noting.css",
}),
eslint({
exclude: ["node_modules/**"],
}),
babel(),
],
},
{
//Types
input: "./dist/index.d.ts",
output: [{ file: "dist/noting.d.ts", format: "es" }],
plugins: [dts()],
},
{
// Github pages
input: "pages/index.js",
output: {
file: "pages/dist/bundle.js",
format: "iife",
name: "Pages",
},
plugins: [
scss({
output: "pages/dist/styles.css",
}),
eslint({
exclude: ["node_modules/**"],
}),
resolve({ browser: true }),
commonjs(),
],
},
];