mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-25 01:40:10 +00:00
71 lines
1.6 KiB
JavaScript
71 lines
1.6 KiB
JavaScript
module.exports = function (grunt) {
|
|
|
|
'use strict';
|
|
|
|
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'] }
|
|
},
|
|
|
|
jsdoc : {
|
|
dist : {
|
|
src: ['src/**/*.js'],
|
|
options: {
|
|
private: true,
|
|
destination: 'doc'
|
|
}
|
|
}
|
|
},
|
|
|
|
clean: ['test/sandbox'],
|
|
|
|
yuidoc: {
|
|
compile: {
|
|
name: '<%= pkg.name %>',
|
|
description: '<%= pkg.description %>',
|
|
version: '<%= pkg.version %>',
|
|
url: '<%= pkg.homepage %>',
|
|
options: {
|
|
paths: 'src/',
|
|
//themedir: 'path/to/custom/theme/',
|
|
outdir: 'docs/'
|
|
}
|
|
}
|
|
},
|
|
|
|
jshint: {
|
|
options: {
|
|
laxcomma: true,
|
|
expr: true
|
|
},
|
|
all: ['Gruntfile.js', 'src/**/*.js', 'test/*.js']
|
|
}
|
|
|
|
};
|
|
|
|
grunt.initConfig( opts );
|
|
|
|
grunt.loadNpmTasks('grunt-simple-mocha');
|
|
grunt.loadNpmTasks('grunt-contrib-yuidoc');
|
|
grunt.loadNpmTasks('grunt-jsdoc');
|
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
|
|
grunt.registerTask('test', 'Test the HackMyResume library.',
|
|
function( config ) { grunt.task.run(['clean','jshint','simplemocha:all']); });
|
|
grunt.registerTask('document', 'Generate HackMyResume library documentation.',
|
|
function( config ) { grunt.task.run( ['jsdoc'] ); });
|
|
grunt.registerTask('default', [ 'test', 'jsdoc' ]);
|
|
|
|
};
|