lib/carte.coffee in carte-server-0.0.11 vs lib/carte.coffee in carte-server-0.0.12
- old
+ new
@@ -8,9 +8,21 @@
watchify = require 'watchify'
uglify = require 'gulp-uglify'
streamify = require 'gulp-streamify'
module.exports = class Carte
+ install: (gulp, config)->
+ gulp.task 'build', =>
+ @build
+ watch: false
+ minify: true
+ config: config
+ gulp.task 'watch', =>
+ @build
+ watch: true
+ minifty: false
+ config: config
+
build: (options)->
config = require(options.config)
fs.writeFileSync(__dirname + '/carte/shared/config.json', JSON.stringify(config))
dir = path.dirname config.script_path
file = path.basename config.script_path