pofile/Gruntfile.coffee
Ruben Vermeersch 8fe9cd7bf8 Fix alias
2017-03-06 17:26:45 +01:00

63 lines
1.6 KiB
CoffeeScript

module.exports = (grunt) ->
@loadNpmTasks('grunt-browserify')
@loadNpmTasks('grunt-bump')
@loadNpmTasks('grunt-contrib-clean')
@loadNpmTasks('grunt-contrib-jshint')
@loadNpmTasks('grunt-contrib-uglify')
@loadNpmTasks('grunt-contrib-watch')
@loadNpmTasks('grunt-jscs')
@loadNpmTasks('grunt-mocha-cli')
@initConfig
clean:
dist: ['dist']
jshint:
all: [ 'lib/*.js', 'test/*.js' ]
options:
jshintrc: '.jshintrc'
jscs:
src:
options:
config: '.jscs.json'
files:
src: [ 'lib/*.js', 'test/*.js' ]
watch:
all:
options:
atBegin: true
files: ['lib/**.js', 'test/*{,/*}']
tasks: ['test']
mochacli:
options:
files: 'test/*.js'
spec:
options:
reporter: 'spec'
browserify:
dist:
files:
'dist/pofile.js': ['lib/po.js']
options:
alias:
pofile: './lib/po.js'
uglify:
dist:
files:
'dist/pofile.min.js': 'dist/pofile.js'
bump:
options:
files: ['package.json', 'bower.json']
commitFiles: ['-a']
pushTo: 'origin'
@registerTask 'default', ['test']
@registerTask 'build', ['clean', 'jshint', 'jscs', 'browserify', 'uglify']
@registerTask 'test', ['build', 'mochacli']