gulp-ngc

0.3.3 • Public • Published

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',
    });
});
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.3
    44
    • latest

Version History

Package Sidebar

Install

npm i gulp-ngc

Weekly Downloads

90

Version

0.3.3

License

MIT

Last publish

Collaborators

  • jolly-roger