Start setting up Gulp
This commit is contained in:
parent
f018a9aa51
commit
a107360bdd
|
@ -0,0 +1,36 @@
|
||||||
|
gulp = require('gulp')
|
||||||
|
|
||||||
|
$ = require('gulp-load-plugins')()
|
||||||
|
|
||||||
|
browserify = require('browserify')
|
||||||
|
source = require('vinyl-source-stream')
|
||||||
|
coffeeify = require('coffeeify')
|
||||||
|
watchify = require('watchify')
|
||||||
|
|
||||||
|
karma = require('karma')
|
||||||
|
|
||||||
|
gulp.task 'browserify', ->
|
||||||
|
browserify('./src/bismarck.coffee', extensions: ['.coffee'])
|
||||||
|
.transform({}, coffeeify)
|
||||||
|
.pipe source('bismarck.js')
|
||||||
|
.pipe gulp.dest('./dist')
|
||||||
|
|
||||||
|
gulp.task 'watch', ->
|
||||||
|
gulp.watch './src/**/*.coffee', ['coffee', 'browserify']
|
||||||
|
|
||||||
|
gulp.task 'coffee', ->
|
||||||
|
gulp
|
||||||
|
.src('./src/**/*.coffee')
|
||||||
|
.pipe $.coffee(bare: true)
|
||||||
|
.pipe gulp.dest('./lib')
|
||||||
|
|
||||||
|
gulp.task 'scripts', ->
|
||||||
|
bundlerTarget(createBrowserify().bundle())
|
||||||
|
|
||||||
|
gulp.task 'karma', ->
|
||||||
|
karma.server.start {
|
||||||
|
configFile: __dirname + '/karma.conf.js'
|
||||||
|
}
|
||||||
|
|
||||||
|
gulp.task 'default', ['scripts', 'watch', 'karma']
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^6.1.0",
|
"browserify": "^6.1.0",
|
||||||
|
"coffee-script": "^1.8.0",
|
||||||
"coffeeify": "^0.7.0",
|
"coffeeify": "^0.7.0",
|
||||||
"grunt": "^0.4.5",
|
"grunt": "^0.4.5",
|
||||||
"grunt-browserify": "^3.1.0",
|
"grunt-browserify": "^3.1.0",
|
||||||
|
@ -19,6 +20,10 @@
|
||||||
"grunt-contrib-uglify": "^0.6.0",
|
"grunt-contrib-uglify": "^0.6.0",
|
||||||
"grunt-contrib-watch": "^0.6.1",
|
"grunt-contrib-watch": "^0.6.1",
|
||||||
"grunt-karma": "^0.9.0",
|
"grunt-karma": "^0.9.0",
|
||||||
|
"gulp": "^3.8.9",
|
||||||
|
"gulp-coffee": "^2.2.0",
|
||||||
|
"gulp-load-plugins": "^0.7.1",
|
||||||
|
"gulp-util": "^3.0.1",
|
||||||
"karma": "^0.12.23",
|
"karma": "^0.12.23",
|
||||||
"karma-bro": "^0.8.0",
|
"karma-bro": "^0.8.0",
|
||||||
"karma-chrome-launcher": "^0.1.4",
|
"karma-chrome-launcher": "^0.1.4",
|
||||||
|
@ -26,11 +31,13 @@
|
||||||
"karma-firefox-launcher": "^0.1.3",
|
"karma-firefox-launcher": "^0.1.3",
|
||||||
"karma-jasmine": "~0.2.2",
|
"karma-jasmine": "~0.2.2",
|
||||||
"karma-phantomjs-launcher": "^0.1.4",
|
"karma-phantomjs-launcher": "^0.1.4",
|
||||||
"matchdep": "^0.3.0"
|
"matchdep": "^0.3.0",
|
||||||
|
"merge": "^1.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"q": "^1.0.1",
|
"q": "^1.0.1",
|
||||||
"underscore": "^1.7.0",
|
"underscore": "^1.7.0",
|
||||||
|
"vinyl-source-stream": "^1.0.0",
|
||||||
"xml2js": "^0.4.4"
|
"xml2js": "^0.4.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue