Igor Minar db3113ba16 build(aio): externalize @angular/cli patches into a js file
This improves code readability and maintainability.
2017-05-26 01:19:59 -07:00

12 lines
385 B
JavaScript

const fs = require('fs');
const sh = require('shelljs');
PATCH_LOCK = 'node_modules/@angular/cli/models/webpack-configs/.patched';
if (!fs.existsSync(PATCH_LOCK)) {
sh.touch(PATCH_LOCK);
sh.exec(`patch -p0 -i tools/cli-patches/ngo-loader.patch &&
patch -p0 -i node_modules/purify/angular-cli.patch &&
patch -p0 -i tools/cli-patches/uglify-config.patch`);
}