@@ -175,40 +175,6 @@ function mergeWithRootTsLint(parentHost: Tree) {
175
175
} ;
176
176
}
177
177
178
- function addPostInstallScript ( ) {
179
- return ( host : Tree ) => {
180
- const pkgJsonPath = '/package.json' ;
181
- const buffer = host . read ( pkgJsonPath ) ;
182
- if ( ! buffer ) {
183
- throw new SchematicsException ( 'Could not read package.json.' ) ;
184
- }
185
-
186
- const packageJsonAst = parseJsonAst ( buffer . toString ( ) , JsonParseMode . Strict ) ;
187
- if ( packageJsonAst . kind !== 'object' ) {
188
- throw new SchematicsException ( 'Invalid package.json. Was expecting an object.' ) ;
189
- }
190
-
191
- const scriptsNode = findPropertyInAstObject ( packageJsonAst , 'scripts' ) ;
192
- if ( scriptsNode && scriptsNode . kind === 'object' ) {
193
- const recorder = host . beginUpdate ( pkgJsonPath ) ;
194
- const postInstall = findPropertyInAstObject ( scriptsNode , 'postinstall' ) ;
195
-
196
- if ( ! postInstall ) {
197
- // postinstall script not found, add it.
198
- insertPropertyInAstObjectInOrder (
199
- recorder ,
200
- scriptsNode ,
201
- 'postinstall' ,
202
- 'ivy-ngcc' ,
203
- 4 ,
204
- ) ;
205
- }
206
-
207
- host . commitUpdate ( recorder ) ;
208
- }
209
- } ;
210
- }
211
-
212
178
function addAppToWorkspaceFile ( options : ApplicationOptions , workspace : WorkspaceSchema ) : Rule {
213
179
// TODO: use JsonAST
214
180
// const workspacePath = '/angular.json';
@@ -453,7 +419,6 @@ export default function (options: ApplicationOptions): Rule {
453
419
move ( sourceDir ) ,
454
420
] ) , MergeStrategy . Overwrite ) ,
455
421
options . minimal ? noop ( ) : schematic ( 'e2e' , e2eOptions ) ,
456
- options . enableIvy ? addPostInstallScript ( ) : noop ( ) ,
457
422
options . skipPackageJson ? noop ( ) : addDependenciesToPackageJson ( options ) ,
458
423
options . lintFix ? applyLintFix ( appDir ) : noop ( ) ,
459
424
] ) ;
0 commit comments