coffeescript - Gulp: Splitting Files Into Separate Locations -


i'd separate javascript files coffee-script files!

this current file structure:

engine   world     behaviour.coffee     behaviour.js   character     behaviour.coffee     behaviour.js   engine.coffee   engine.js 

this structure prefer:

src   engine     world       behaviour.coffee     character       behaviour.coffee     engine.coffee 

and:

dest   engine     world       behaviour.js     character       behaviour.js     engine.js 

my actual gulp file looks this:

gulp = require 'gulp' coffee = require 'gulp-coffee'  gulp.task 'all-coffee-files', ->   gulp.src './**/*.coffee'   .pipe coffee()   .pipe gulp.dest (file) ->     file.base  gulp.task 'watch', ->   gulp.watch './**/*.coffee', ['all-coffee-files'] 

what edits have make in order achieve splitting?

thank much!

not familiar coffescript syntax, following should work:

gulp = require 'gulp' coffee = require 'gulp-coffee'  gulp.task 'all-coffee-files', ->   gulp.src './src/**/*.coffee'   .pipe coffee()   .pipe gulp.dest('./dest/')  gulp.task 'watch', ->   gulp.watch './src/**/*.coffee', ['all-coffee-files'] 

this sources in ./src/ , places resulting .js files in ./dest/, while keeping directory structure intact.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -