File tree 6 files changed +24
-2
lines changed
6 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -74,18 +74,24 @@ function loadPackageJson(p: string) {
74
74
75
75
for ( const key of Object . keys ( root ) ) {
76
76
switch ( key ) {
77
+ // Keep the following keys from the package.json of the package itself.
77
78
case 'bin' :
78
79
case 'description' :
79
80
case 'dependencies' :
80
- case 'devDependencies' :
81
81
case 'name' :
82
82
case 'main' :
83
83
case 'peerDependencies' :
84
- case 'scripts' :
85
84
case 'typings' :
86
85
case 'version' :
87
86
continue ;
88
87
88
+ // Remove the following keys from the package.json.
89
+ case 'devDependencies' :
90
+ case 'scripts' :
91
+ delete pkg [ key ] ;
92
+ continue ;
93
+
94
+ // Merge the following keys with the root package.json.
89
95
case 'keywords' :
90
96
const a = pkg [ key ] || [ ] ;
91
97
const b = Object . keys (
@@ -97,6 +103,7 @@ function loadPackageJson(p: string) {
97
103
pkg [ key ] = b ;
98
104
break ;
99
105
106
+ // Overwrite the package's key with to root one.
100
107
default :
101
108
pkg [ key ] = root [ key ] ;
102
109
}
Original file line number Diff line number Diff line change 4
4
"description" : " CLI tool for Angular" ,
5
5
"main" : " src/index.js" ,
6
6
"typings" : " src/index.d.ts" ,
7
+ "scripts" : {
8
+ "preinstall" : " echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1"
9
+ },
7
10
"private" : true
8
11
}
Original file line number Diff line number Diff line change 8
8
"build-optimizer" : " ./src/build-optimizer/cli.js" ,
9
9
"purify" : " ./src/purify/cli.js"
10
10
},
11
+ "scripts" : {
12
+ "preinstall" : " echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1"
13
+ },
11
14
"dependencies" : {
12
15
"loader-utils" : " ^1.1.0" ,
13
16
"source-map" : " ^0.5.6" ,
Original file line number Diff line number Diff line change 4
4
"description" : " Angular DevKit - Core Utility Library" ,
5
5
"main" : " src/index.js" ,
6
6
"typings" : " src/index.d.ts" ,
7
+ "scripts" : {
8
+ "preinstall" : " echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1"
9
+ },
7
10
"keywords" : [
8
11
" core"
9
12
],
Original file line number Diff line number Diff line change 5
5
"bin" : {
6
6
"schematics" : " ./bin/schematics.js"
7
7
},
8
+ "scripts" : {
9
+ "preinstall" : " echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1"
10
+ },
8
11
"main" : " src/index.js" ,
9
12
"typings" : " src/index.d.ts" ,
10
13
"keywords" : [
Original file line number Diff line number Diff line change 7
7
" code generation" ,
8
8
" schematics"
9
9
],
10
+ "scripts" : {
11
+ "preinstall" : " echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1"
12
+ },
10
13
"schematics" : " ./collection.json" ,
11
14
"peerDependencies" : {
12
15
"@angular-devkit/schematics" : " 0.0.0"
You can’t perform that action at this time.
0 commit comments