File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const walkModules = ((path = 'node_modules') => {
10
10
11
11
if ( item . name === 'package.json' ) {
12
12
let pkg = JSON . parse ( fs . readFileSync ( item . path , 'utf8' ) ) ;
13
+ if ( ! pkg . scripts ) return ;
13
14
let scripts = Object . keys ( pkg . scripts ) ;
14
15
scripts . forEach ( ( script ) => {
15
16
if ( scriptTypes . includes ( script ) ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " npm-viewscripts" ,
3
3
"version" : " 1.0.0" ,
4
- "bin" : " cli.js" ,
4
+ "bin" : {
5
+ "npm-viewscripts" : " cli.js"
6
+ },
7
+ "main" : " index.js" ,
5
8
"description" : " " ,
6
9
"scripts" : {
7
10
"test" : " echo \" Error: no test specified\" && exit 1"
18
21
"homepage" : " https://github.com/js-kyle/npm-viewscripts#readme" ,
19
22
"dependencies" : {
20
23
"directory-tree" : " ^2.2.4"
21
- }
24
+ },
25
+ "preferGlobal" : true
22
26
}
You can’t perform that action at this time.
0 commit comments