mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 07:58:34 +02:00
101 lines
2.4 KiB
JavaScript
101 lines
2.4 KiB
JavaScript
/*global module:false*/
|
|
module.exports = function(grunt) {
|
|
// eventually have sound...?
|
|
grunt.registerTask('compliment', 'Stay motivated!', function() {
|
|
var defaults = ['Awesome!!'];
|
|
|
|
var compliments = grunt.config('compliment.compliments') || defaults;
|
|
var index = Math.floor(Math.random() * compliments.length);
|
|
|
|
grunt.log.writeln(compliments[index]);
|
|
});
|
|
|
|
grunt.initConfig({
|
|
lint: {
|
|
files: ['grunt.js', 'src/*.js']
|
|
},
|
|
compliment: {
|
|
compliments: [
|
|
"Wow peter great work!",
|
|
"Such a professional dev environment",
|
|
"Can't stop the TRAIN",
|
|
"git raging"
|
|
]
|
|
},
|
|
/*
|
|
jasmine_node: {
|
|
specNameMatcher: './spec', // load only specs containing specNameMatcher
|
|
projectRoot: '.',
|
|
requirejs: false,
|
|
forceExit: true,
|
|
jUnit: {
|
|
report: false,
|
|
savePath : './build/reports/jasmine/',
|
|
useDotNotation: true,
|
|
consolidate: true
|
|
}
|
|
},
|
|
*/
|
|
watch: {
|
|
files: '<config:lint.files>',
|
|
tasks: 'default'
|
|
},
|
|
jshint: {
|
|
options: {
|
|
curly: true,
|
|
// sometimes triple equality is just redundant and unnecessary
|
|
eqeqeq: false,
|
|
regexp: false,
|
|
immed: true,
|
|
latedef: false,
|
|
nonew: false,
|
|
newcap: true,
|
|
noarg: true,
|
|
bitwise: true,
|
|
sub: true,
|
|
undef: true,
|
|
unused: false,
|
|
trailing: true,
|
|
devel: true,
|
|
jquery: true,
|
|
nonstandard: true,
|
|
boss: true,
|
|
eqnull: true,
|
|
browser: true,
|
|
debug: true
|
|
},
|
|
globals: {
|
|
_: true,
|
|
Backbone: true,
|
|
'$': true,
|
|
Raphael: true,
|
|
require: true,
|
|
console: true,
|
|
describe: true,
|
|
expect: true,
|
|
it: true,
|
|
exports: true
|
|
}
|
|
},
|
|
browserify: {
|
|
'build/bundle.js': {
|
|
//requires: ['traverse'],
|
|
// aliases: ['jquery:jquery-browserify'],
|
|
entries: ['src/*.js'],
|
|
//prepend: ['<banner:meta.banner>'],
|
|
append: [],
|
|
/*hook: function (bundle) {
|
|
// Do something with bundle
|
|
}*/
|
|
}
|
|
}
|
|
});
|
|
|
|
//grunt.loadNpmTasks('grunt-jasmine-node');
|
|
grunt.loadNpmTasks('grunt-browserify');
|
|
grunt.loadNpmTasks('grunt-jslint');
|
|
|
|
// Default task.
|
|
grunt.registerTask('default', 'browserify compliment'); //jasmine_node');
|
|
};
|
|
|