Package Exports
- gulp-ngc
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-ngc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-ngc
Extremely simple and dummy gulp plugin who wraps @angular/compiler-cli
Angular 5
Angular 5 has brought breaking changes for this plugin, that is why currently it isn't compatible with this version of Angular
Usage
In order to build your angular2 project with ngc simply pass path to your tsconfig.json file
Example:
import ngc from 'gulp-ngc';
gulp.task('ngc', () => {
return ngc('tsconfig.json');
});
More useful example:
import gulp from 'gulp';
import rollup from 'rollup-stream';
import source from 'vinyl-source-stream';
import ngc from 'gulp-ngc';
import rollupConfig from './rollup-config';
gulp.task('ngc', () => {
return ngc('tsconfig.json');
});
gulp.task('rollup', ['ngc'], () => {
return rollup(rollupConfig)
.pipe(source('index.js'))
.pipe(gulp.dest('./dist'));
});
Using NGC options:
gulp.task('ngc', () => {
return ngc('tsconfig.json', {
i18nFile: './src/locale/messages.fr.xlf',
locale: 'fr',
i18nFormat: 'xlf',
});
});