File tree 2 files changed +32
-1
lines changed
repo-scripts/size-analysis 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 13
13
"test" : " run-p lint test:node" ,
14
14
"test:ci" : " node ../../scripts/run_tests_in_ci.js -s test:node" ,
15
15
"pretest:node" : " tsc -p test/test-inputs && rollup -c" ,
16
- "test:node" : " TS_NODE_COMPILER_OPTIONS='{\" module\" :\" commonjs\" }' nyc --reporter lcovonly -- mocha **/*.test.ts --config ../../config/mocharc.node.js --timeout 60000"
16
+ "test:node" : " TS_NODE_COMPILER_OPTIONS='{\" module\" :\" commonjs\" }' nyc --reporter lcovonly -- mocha **/*.test.ts --config ../../config/mocharc.node.js --timeout 60000" ,
17
+ "build" : " rollup -c"
17
18
},
18
19
"dependencies" : {
19
20
"rollup" : " 2.35.1" ,
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ const deps = Object.keys(
24
24
Object . assign ( { } , pkg . peerDependencies , pkg . dependencies )
25
25
) ;
26
26
27
+ const nodeInternals = [ 'fs' , 'path' ] ;
28
+
27
29
export default [
28
30
{
29
31
input : 'test/test-inputs/subsetExports.ts' ,
@@ -49,5 +51,33 @@ export default [
49
51
} )
50
52
] ,
51
53
external : id => deps . some ( dep => id === dep || id . startsWith ( `${ dep } /` ) )
54
+ } ,
55
+ {
56
+ input : 'cli.ts' ,
57
+ output : [
58
+ {
59
+ file : 'dist/cli.js' ,
60
+ format : 'cjs' ,
61
+ sourcemap : false
62
+ }
63
+ ] ,
64
+ plugins : [
65
+ typescriptPlugin ( {
66
+ typescript,
67
+ tsconfigOverride : {
68
+ compilerOptions : {
69
+ target : 'es2017' ,
70
+ module : 'es2015'
71
+ }
72
+ }
73
+ } ) ,
74
+ json ( {
75
+ preferConst : true
76
+ } )
77
+ ] ,
78
+ external : id =>
79
+ [ ...deps , ...nodeInternals ] . some (
80
+ dep => id === dep || id . startsWith ( `${ dep } /` )
81
+ )
52
82
}
53
83
] ;
You can’t perform that action at this time.
0 commit comments