Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gulp.task('ngc', function () {
return ngc({
project: `${tmpFolder}/tsconfig.es5.json`
})
.then((exitCode) => {
if (exitCode === 1) {
// This error is caught in the 'compile' task by the runSequence method callback
// so that when ngc fails to compile, the whole compile process stops running
throw new Error('ngc compilation failed');
}
});
});
gulp.task('ngc', function () {
return ngc({
project: `${tmpFolder}/tsconfig.es5.json`
})
.then((exitCode) => {
if (exitCode === 1) {
// This error is caught in the 'compile' task by the runSequence method callback
// so that when ngc fails to compile, the whole compile process stops running
throw new Error('ngc compilation failed');
}
});
});
gulp.task('ngc', function () {
return ngc({
project: `${tmpFolder}/tsconfig.es5.json`
})
.then((exitCode) => {
if (exitCode === 1) {
// This error is caught in the 'compile' task by the runSequence method callback
// so that when ngc fails to compile, the whole compile process stops running
throw new Error('ngc compilation failed');
}
});
});
const ngc = (args) => new Promise((resolve, reject) => {// Promisify version of the ngc compiler
let exitCode = require('@angular/compiler-cli/src/main').main(args);
resolve(exitCode);
});
const rollup = require('rollup');
const ngc = (args) => new Promise((resolve, reject) => { // Promisify version of the ngc compiler
let exitCode = require('@angular/compiler-cli/src/main').main(args);
resolve(exitCode);
});
gulp.task('ngc', function () {
return ngc({
project: `${tmpFolder}/tsconfig.json`
})
.then((exitCode) => {
if (exitCode === 1) {
// This error is caught in the 'compile' task by the runSequence method callback
// so that when ngc fails to compile, the whole compile process stops running
throw new Error('ngc compilation failed');
}
});
});
const ngc = (args) => new Promise((resolve, reject)=>{// Promisify version of the ngc compiler
let exitCode = require('@angular/compiler-cli/src/main').main(args);
resolve(exitCode);
});
const rollup = require('rollup');
const ngc = (args) => new Promise((resolve, reject) => {// Promisify version of the ngc compiler
let exitCode = require('@angular/compiler-cli/src/main').main(args);
resolve(exitCode);
});
const rollup = require('rollup');
.then(() => ngc({ project: `${tempLibFolder}/tsconfig.es5.json` })
.then(exitCode => exitCode === 0 ? Promise.resolve() : Promise.reject())
.then(() => console.log('ES5 compilation succeeded.'))
)
.then(() => ngc({ project: `${buildFolder}/tsconfig.lib.json` })
.then(exitCode => exitCode === 0 ? Promise.resolve() : Promise.reject())
.then(() => gulpUtil.log('ES2015 compilation succeeded.'))
)