Open EdgarOrtegaRamirez opened 9 years ago
@EdgarOrtegaRamirez I think, the better case for coffescript is to use js2coffee module (gulp-plugin, and online preview) instead:
var coffee = require('gulp-js2coffee');
gulp.task('js2coffee', function() {
gulp.src('configFile.json')
.pipe(gulpNgConfig('myApp.config'))
.pipe(js2coffee().on('error', gutil.log))
.pipe(gulp.dest('./'))
});
Clean solution by enforcing separation of concerns with that suggestion @se-panfilov :+1:
This'll be an additional usage to the README
Hi @se-panfilov your code has an error when you use js2coffee, the right form to use js2coffee with ng-config, at least this form works for me that I use gulp-angular-generator
var coffee = require('gulp-js2coffee');
gulp.task('create-env', function () {
gulp.src(path.join(conf.paths.src, '/.env.json'))
.pipe(gulpNgConfig('YourApp'))
.pipe(coffee())
.pipe(gulp.dest( path.join(conf.paths.src, '/') ))
});
It would be great. :smile: