I want to process some files with 'coffee', add some js files, concat and minify.
This does not work, coffee fails on the regular js files:
gulp.task 'build-js', -> gulp.src([ "bower_components/mbdev-core/dist/js/db.js" "bower_components/mbdev-core/dist/js/utils.js" "src/js/config/app.coffee" "src/js/config/app-db.coffee" "src/js/accounts/accounts.coffee" "src/js/budget_items/budget_items.coffee" "src/js/line_items/line_items.coffee" "src/js/misc/misc.coffee" "src/js/reports/report_generators.coffee" "src/js/reports/reports.coffee" ]) .pipe(coffee()).on('error', gutil.log) .pipe(concat('app.js')) .pipe(gulp.dest('public/js'))
Is there a way to add files after the coffee part?
The first and the easiest one is to right-click on the selected SRC file. From the drop-down menu select "Choose default program", then click "Browse" and find the desired program. The whole operation must be confirmed by clicking OK.
The src attribute specifies the location (URL) of the external resource. Your browser does not support the audio element. An audio player with two source files. The browser should choose which file (if any) it has support for: Your browser does not support the audio element.
If you are sure that all of these reasons do not exist in your case (or have already been eliminated), the SRC file should operate with your programs without any problem. If the problem with the SRC file has not been solved, it may be due to the fact that in this case there is also another rare problem with the SRC file.
You don't need to add files to the original src, but rather to use coffee only "if"...
So, use gulp-if
gulp.task('task', function() { gulp.src('./stuff/*') .pipe(gulpif(/[.]coffee$/, coffee())) .pipe(gulp.dest('./dist/')); });
See here more about gulp-if.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With