1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-12-23 05:37:23 +00:00

Tweak test & clean.

This commit is contained in:
hacksalot 2016-01-25 10:55:25 -05:00
parent 0497696dcf
commit cf18c5d90d
2 changed files with 12 additions and 5 deletions

View File

@ -46,7 +46,10 @@ module.exports = function (grunt) {
}
},
clean: ['dist','test/sandbox'],
clean: {
test: ['test/sandbox'],
dist: ['dist']
},
yuidoc: {
compile: {
@ -80,21 +83,25 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
// Use 'grunt test' for local testing
grunt.registerTask('test', 'Test the HackMyResume application.',
function( config ) {
grunt.task.run(['build','jshint','simplemocha:all']);
grunt.task.run(['clean:test','build','jshint','simplemocha:all']);
});
// Use 'grunt document' to build docs
grunt.registerTask('document', 'Generate HackMyResume documentation.',
function( config ) {
grunt.task.run( ['jsdoc'] );
});
// Use 'grunt build' to build HMR
grunt.registerTask('build', 'Build the HackMyResume application.',
function( config ) {
grunt.task.run( ['clean','copy','coffee'] );
grunt.task.run( ['clean:dist','copy','coffee'] );
});
grunt.registerTask('default', [ 'test', 'jsdoc' ]);
// Default task does everything
grunt.registerTask('default', [ 'test', 'document' ]);
};

View File

@ -7,7 +7,7 @@
"url": "https://github.com/hacksalot/HackMyResume.git"
},
"scripts": {
"test": "grunt clean && mocha",
"test": "grunt clean:test && mocha",
"grunt": "grunt"
},
"keywords": [