diff --git a/Gruntfile.coffee b/Gruntfile.coffee deleted file mode 100644 index cd2e86f..0000000 --- a/Gruntfile.coffee +++ /dev/null @@ -1,71 +0,0 @@ -module.exports = (grunt) -> - - grunt.initConfig - - build: - client: 'src/**/*.js' - - # JSHint options - # http://www.jshint.com/options/ - jshint: - plugin: - files: - src: 'lib/**/*.js' - options: - # node - node: true, - strict: false - - options: - quotmark: 'single' - bitwise: true - indent: 2 - camelcase: true - strict: true - trailing: true - curly: true - eqeqeq: true - immed: true - latedef: true - newcap: true - noempty: true - unused: true - noarg: true - sub: true - undef: true - maxdepth: 4 - maxlen: 100 - globals: {} - - simplemocha: - options: - ui: 'bdd' - reporter: 'dot' - unit: - src: [ - 'test/**/*.spec.js' - ] - - 'npm-contributors': - options: - commitMessage: 'chore: update contributors' - - bump: - options: - commitMessage: 'chore: release v%VERSION%' - pushTo: 'upstream' - - grunt.loadNpmTasks 'grunt-auto-release' - grunt.loadNpmTasks 'grunt-contrib-jshint' - grunt.loadNpmTasks 'grunt-bump' - grunt.loadNpmTasks 'grunt-npm' - grunt.loadNpmTasks 'grunt-simple-mocha' - - grunt.registerTask 'default', ['jshint', 'test'] - grunt.registerTask 'test', ['simplemocha:unit'] - grunt.registerTask 'release', 'Bump and publish to NPM.', (type) -> - grunt.task.run [ - 'npm-contributors' - "bump:#{type||'patch'}" - 'npm-publish' - ] diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..bb5c7de --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,70 @@ +/* + * decaffeinate suggestions: + * DS102: Remove unnecessary code created because of implicit returns + * Full docs: + * https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md + */ +module.exports = function(grunt) { + grunt.initConfig({ + build: {client: 'src/**/*.js'}, + + // JSHint options + // http://www.jshint.com/options/ + jshint: { + plugin: { + files: {src: 'lib/**/*.js'}, + options: { + // node + node: true, + strict: false + } + }, + options: { + quotmark: 'single', + bitwise: true, + indent: 2, + camelcase: true, + strict: true, + trailing: true, + curly: true, + eqeqeq: true, + immed: true, + latedef: true, + newcap: true, + noempty: true, + unused: true, + noarg: true, + sub: true, + undef: true, + maxdepth: 4, + maxlen: 100, + globals: {} + } + }, + + simplemocha: { + options: {ui: 'bdd', reporter: 'dot'}, + unit: {src: ['test/**/*.spec.js']} + }, + + 'npm-contributors': + {options: {commitMessage: 'chore: update contributors'}}, + + bump: { + options: {commitMessage: 'chore: release v%VERSION%', pushTo: 'upstream'} + } + }); + + grunt.loadNpmTasks('grunt-auto-release'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-bump'); + grunt.loadNpmTasks('grunt-npm'); + grunt.loadNpmTasks('grunt-simple-mocha'); + + grunt.registerTask('default', ['jshint', 'test']); + grunt.registerTask('test', ['simplemocha:unit']); + return grunt.registerTask( + 'release', 'Bump and publish to NPM.', + type => grunt.task.run( + ['npm-contributors', `bump:${type || 'patch'}`, 'npm-publish'])); +};