File tree Expand file tree Collapse file tree 3 files changed +55
-12
lines changed Expand file tree Collapse file tree 3 files changed +55
-12
lines changed Original file line number Diff line number Diff line change 3535 ],
3636 "scripts" : {
3737 "build" : " rollup -c && typedoc src" ,
38- "watch" : " rollup -c -w"
38+ "watch" : " rollup -c -w --config rollup.dev.config.js "
3939 },
4040 "engines" : {
4141 "node" : " >=8.14.0"
Original file line number Diff line number Diff line change @@ -4,12 +4,9 @@ import builtins from "rollup-plugin-node-builtins";
44import typescript from "rollup-plugin-typescript2" ;
55import { terser } from "rollup-plugin-terser" ;
66import sourceMaps from "rollup-plugin-sourcemaps"
7- import serve from "rollup-plugin-serve" ;
8- import livereload from "rollup-plugin-livereload" ;
97
108const name = "DAPjs" ;
119const pkg = require ( './package.json' )
12- const watch = process . env . ROLLUP_WATCH ;
1310
1411export default {
1512 input : "src/index.ts" ,
@@ -27,7 +24,7 @@ export default {
2724 }
2825 ] ,
2926 plugins : [
30- ! watch && del ( {
27+ del ( {
3128 targets : [
3229 "dist/*" ,
3330 "types/*"
@@ -41,12 +38,6 @@ export default {
4138 useTsconfigDeclarationDir : true
4239 } ) ,
4340 terser ( ) ,
44- sourceMaps ( ) ,
45- watch && serve ( {
46- contentBase : "." ,
47- open : true ,
48- openPage : "/examples/daplink-flash/web.html" ,
49- } ) ,
50- watch && livereload ( )
41+ sourceMaps ( )
5142 ]
5243} ;
Original file line number Diff line number Diff line change 1+ import del from "rollup-plugin-delete" ;
2+ import tslint from "rollup-plugin-tslint" ;
3+ import builtins from "rollup-plugin-node-builtins" ;
4+ import typescript from "rollup-plugin-typescript2" ;
5+ import { terser } from "rollup-plugin-terser" ;
6+ import sourceMaps from "rollup-plugin-sourcemaps"
7+ import serve from "rollup-plugin-serve" ;
8+ import livereload from "rollup-plugin-livereload" ;
9+
10+ const name = "DAPjs" ;
11+ const pkg = require ( './package.json' )
12+ const watch = process . env . ROLLUP_WATCH ;
13+
14+ export default {
15+ input : "src/index.ts" ,
16+ output : [
17+ {
18+ file : pkg . main ,
19+ format : "umd" ,
20+ sourcemap : true ,
21+ name
22+ } ,
23+ {
24+ file : pkg . module ,
25+ format : "esm" ,
26+ sourcemap : true
27+ }
28+ ] ,
29+ plugins : [
30+ ! watch && del ( {
31+ targets : [
32+ "dist/*" ,
33+ "types/*"
34+ ]
35+ } ) ,
36+ tslint ( {
37+ throwOnError : true
38+ } ) ,
39+ builtins ( ) ,
40+ typescript ( {
41+ useTsconfigDeclarationDir : true
42+ } ) ,
43+ terser ( ) ,
44+ sourceMaps ( ) ,
45+ watch && serve ( {
46+ contentBase : "." ,
47+ open : true ,
48+ openPage : "/examples/daplink-flash/web.html" ,
49+ } ) ,
50+ watch && livereload ( )
51+ ]
52+ } ;
You can’t perform that action at this time.
0 commit comments