HackMyResume/Gruntfile.js

53 lines
1.1 KiB
JavaScript
Raw Permalink Normal View History

2015-10-26 16:30:00 +00:00
module.exports = function (grunt) {
2015-12-10 02:44:18 +00:00
'use strict';
2015-10-26 16:30:00 +00:00
var opts = {
pkg: grunt.file.readJSON('package.json'),
simplemocha: {
options: {
globals: ['expect', 'should'],
timeout: 3000,
ignoreLeaks: false,
ui: 'bdd',
reporter: 'spec'
},
all: { src: ['test/*.js'] }
2015-11-21 08:10:11 +00:00
},
2016-01-25 15:55:25 +00:00
clean: {
test: ['test/sandbox']
2016-01-25 15:55:25 +00:00
},
2015-12-18 20:33:18 +00:00
2018-02-12 08:34:55 +00:00
eslint: {
target: ['Gruntfile.js', 'src/**/*.js', 'test/*.js']
2015-10-26 16:30:00 +00:00
}
};
grunt.initConfig( opts );
grunt.loadNpmTasks('grunt-simple-mocha');
2018-02-12 08:34:55 +00:00
grunt.loadNpmTasks('grunt-eslint');
2015-12-18 20:33:18 +00:00
grunt.loadNpmTasks('grunt-contrib-clean');
2015-12-10 02:44:18 +00:00
2016-01-25 15:55:25 +00:00
// Use 'grunt test' for local testing
2016-01-25 15:34:57 +00:00
grunt.registerTask('test', 'Test the HackMyResume application.',
2018-02-12 09:01:00 +00:00
function() {
2018-02-12 08:34:55 +00:00
grunt.task.run(['clean:test','build','eslint','simplemocha:all']);
}
);
2016-01-25 15:34:57 +00:00
2016-01-25 15:55:25 +00:00
// Use 'grunt build' to build HMR
2016-01-25 15:34:57 +00:00
grunt.registerTask('build', 'Build the HackMyResume application.',
2018-02-12 09:01:00 +00:00
function() {
grunt.task.run( ['eslint'] );
2018-02-12 08:34:55 +00:00
}
);
2016-01-25 15:34:57 +00:00
2016-01-25 15:55:25 +00:00
// Default task does everything
grunt.registerTask('default', [ 'test' ]);
2015-10-26 16:30:00 +00:00
};