Skip to content

Commit

Permalink
Init Gulpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hakatashi committed Oct 15, 2015
1 parent 8a8546a commit e5b18d5
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.coffee]
indent_style = tab
tab_width = 2

[*.js]
indent_style = tab
tab_width = 4

[*.yml]
indent_style = space
tab_width = 2

[*.json]
indent_style = space
tab_width = 2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules/
npm-debug.log
coverage
build
25 changes: 25 additions & 0 deletions Gulpfile.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
gulp = require 'gulp'
browserify = require 'browserify'
babelify = require 'babelify'
jshint = require 'gulp-jshint'
mocha = require 'gulp-mocha'
mochaPhantom = require 'gulp-mocha-phantomjs'
sourceStream = require 'vinyl-source-stream'

gulp.task 'test-static', ->
gulp.src ['*.js', 'src/*.js', 'test/*.js']
.pipe jshint()
.pipe jshint.reporter 'default'

gulp.task 'build', ->
browserify 'browser.js'
.transform babelify
.bundle()
.pipe sourceStream 'bundle.js'
.pipe gulp.dest 'build'

gulp.task 'test-node', ->
gulp.src 'test/*.js', read: false
.pipe mocha reporter: 'spec'

gulp.task 'default', ['test-static', 'build', 'test-node']
16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,26 @@
"meow": "~3.3.0"
},
"devDependencies": {
"browserify": "^7.0.0",
"babelify": "^6.3.0",
"browserify": "^11.2.0",
"coffee-script": "^1.10.0",
"coveralls": "^2.11.2",
"grunt-cli": "^0.1.13",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-nodeunit": "^0.4.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-mocha-cli": "^1.11.0",
"gulp": "^3.9.0",
"gulp-jshint": "^1.11.2",
"gulp-mocha": "^2.1.3",
"gulp-mocha-phantomjs": "^0.10.1",
"istanbul": "^0.3.6",
"jshint-stylish": "^1.0.0",
"load-grunt-tasks": "^1.0.0",
"mocha": "^2.1.0",
"should": "^5.0.0",
"time-grunt": "^1.0.0"
"time-grunt": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
},
"scripts": {
"test": "grunt",
Expand All @@ -64,5 +71,10 @@
"chrome/latest",
"firefox/latest"
]
},
"coffeelintConfig": {
"no_tabs": {
"level": "ignore"
}
}
}

0 comments on commit e5b18d5

Please sign in to comment.