pofile/Gruntfile.coffee

63 lines
1.7 KiB
CoffeeScript
Raw Normal View History

module.exports = (grunt) ->
2013-12-20 12:31:12 +04:00
@loadNpmTasks('grunt-browserify')
2013-12-20 12:41:38 +04:00
@loadNpmTasks('grunt-bump')
2013-12-20 12:31:12 +04:00
@loadNpmTasks('grunt-contrib-clean')
@loadNpmTasks('grunt-contrib-jshint')
2013-12-20 12:31:12 +04:00
@loadNpmTasks('grunt-contrib-uglify')
@loadNpmTasks('grunt-contrib-watch')
2017-02-10 06:43:31 +03:00
@loadNpmTasks('grunt-jscs')
@loadNpmTasks('grunt-mocha-cli')
@initConfig
2013-12-20 12:31:12 +04:00
clean:
dist: ['dist']
jshint:
all: [ 'lib/*.js', 'test/*.js' ]
options:
jshintrc: '.jshintrc'
2014-06-19 16:16:30 +04:00
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'
2013-12-20 12:31:12 +04:00
browserify:
dist:
files:
'dist/pofile.js': ['lib/po.js']
2017-03-06 19:26:45 +03:00
options:
alias:
pofile: './lib/po.js'
2013-12-20 12:31:12 +04:00
uglify:
dist:
files:
'dist/pofile.min.js': 'dist/pofile.js'
2013-12-20 12:41:38 +04:00
bump:
options:
2021-12-01 12:06:48 +03:00
files: ['package.json', 'package-lock.json', 'bower.json']
2013-12-20 12:41:38 +04:00
commitFiles: ['-a']
pushTo: 'origin'
@registerTask 'default', ['test']
2014-06-19 16:16:30 +04:00
@registerTask 'build', ['clean', 'jshint', 'jscs', 'browserify', 'uglify']
@registerTask 'test', ['build', 'mochacli']