I'd like to know how I can extend angular-cli build process.
I want to add additional JSON file to /dist folder after cli finishes its work.
I can't see a way to add any callback in angular-cli-build.js.
I tried:
var Angular2App = require( 'angular-cli/lib/broccoli/angular2-app' );
var ngCliVersion = require( './ng-cli-version' );
module.exports = function ( defaults ) {
/* CREATE JSON FILE CONTAINS INFO ABOUT BUILD VERSION AND GIT COMMIT */
ngCliVersion.createVersionFile();
return new Angular2App( defaults, {
vendorNpmFiles: [
'systemjs/dist/system-polyfills.js',
'systemjs/dist/system.src.js',
'zone.js/dist/*.js',
'core-js/client/shim.js',
'reflect-metadata/*.js',
'rxjs/**/*.js',
'@angular/**/*.js'
]
} );
};
The problem is that cli wipes dist folder before it starts so file I created is removed.
How then extend build process properly without hacking cli?
public/folder, it will be copied todist/as is...