File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 33
33
! /SECURITY.md
34
34
! /tap-snapshots /
35
35
! /test /
36
+ ! /rollup.config.js
Original file line number Diff line number Diff line change 4
4
"description" : " The semantic version parser used by npm." ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
- "test" : " tap" ,
7
+ "test" : " tap && npm run check-self-contained " ,
8
8
"snap" : " tap" ,
9
+ "check-self-contained" : " rollup -c --silent > /dev/null" ,
9
10
"lint" : " eslint \" **/*.js\" " ,
10
11
"postlint" : " template-oss-check" ,
11
12
"lintfix" : " npm run lint -- --fix" ,
15
16
"devDependencies" : {
16
17
"@npmcli/eslint-config" : " ^4.0.0" ,
17
18
"@npmcli/template-oss" : " 4.14.1" ,
19
+ "@rollup/plugin-commonjs" : " ^24.1.0" ,
20
+ "rollup" : " ^3.21.5" ,
18
21
"tap" : " ^16.0.0"
19
22
},
20
23
"license" : " ISC" ,
Original file line number Diff line number Diff line change
1
+ const fs = require ( 'fs' )
2
+ const commonjs = require ( '@rollup/plugin-commonjs' )
3
+
4
+ const pkgJson = JSON . parse ( fs . readFileSync ( './package.json' , 'utf-8' ) )
5
+
6
+ module . exports = {
7
+ input : pkgJson . main ,
8
+ plugins : [
9
+ commonjs ( {
10
+ strictRequires : true ,
11
+ ignoreTryCatch : true ,
12
+ } ) ,
13
+ ] ,
14
+ external : Object . keys ( pkgJson . dependencies ) ,
15
+ onwarn : ( e ) => {
16
+ if ( e . code === 'CIRCULAR_DEPENDENCY' ) {
17
+ return
18
+ }
19
+
20
+ throw new Error ( e )
21
+ } ,
22
+ }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ const ignore = [
11
11
'tap-snapshots' ,
12
12
'test' ,
13
13
'fixtures' ,
14
+ 'rollup.config.js' ,
14
15
]
15
16
16
17
const { statSync, readdirSync } = require ( 'fs' )
You can’t perform that action at this time.
0 commit comments