Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(build): remove gulp-ngc since it is not supported and replace wit…
Browse files Browse the repository at this point in the history
…h ngc call in gulp
  • Loading branch information
joshuawilson committed Nov 14, 2018
1 parent a300d9b commit b25b8a6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
23 changes: 19 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const gulp = require('gulp'),
cssmin = require('gulp-cssmin'),
del = require('del'),
exec = require('child_process').exec,
gulpngc = require('gulp-ngc'),
// gulpngc = require('gulp-ngc'),
fs = require("fs"),
htmlMinifier = require('html-minifier'),
lessCompiler = require('gulp-less'),
// ngc = require('@angular/compiler-cli/src/main').main,
path = require('path'),
postcss = require('postcss'),
replace = require('gulp-replace'),
rename = require('gulp-rename');
rename = require('gulp-rename'),
sourcemaps = require('gulp-sourcemaps'),
stylelint = require('gulp-stylelint'),
stylus = require('stylus');
Expand Down Expand Up @@ -185,7 +185,7 @@ function inlineTemplate() {
}

// Build the components
function transpile() {
//function transpile() {
/**
* Stick with gulp-ngc v0.2.1 due to "function calls are not supported in decorators" issue
*
Expand All @@ -195,9 +195,24 @@ function transpile() {
* gulp-ngc v0.3.0 uses different args
* See: https://github.com/jolly-roger/gulp-ngc/issues/9
*/
return gulpngc('tsconfig.json');
// return gulpngc('tsconfig.json');
//}
/**
* Since the gulpngc is no longer being supported we need to us ngc
*
* @returns {ChildProcess}
*/
function transpile() {
return exec('node_modules/.bin/ngc -p tsconfig.json', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
if (err !== null) {
process.exit(1);
}
});
}


// Build with AOT enabled
function transpileAot() {
// https://stackoverflow.com/questions/36897877/gulp-error-the-following-tasks-did-not-complete-did-you-forget-to-signal-async
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
"gulp-changed": "3.2.0",
"gulp-cssmin": "0.2.0",
"gulp-less": "4.0.1",
"gulp-ngc": "0.2.1",
"gulp-rename": "1.4.0",
"gulp-replace": "1.0.0",
"gulp-sourcemaps": "2.6.4",
Expand Down

0 comments on commit b25b8a6

Please sign in to comment.