Ghost/Gruntfile.js
2013-05-25 15:11:30 +01:00

65 lines
1.9 KiB
JavaScript

(function () {
"use strict";
var configureGrunt = function (grunt) {
var cfg = {
// JSLint all the things!
jslint: {
directives: {
node: true,
browser: true,
nomen: true,
todo: true
},
files: [
// Lint files in the root, including Gruntfile.js
"*.js",
// Lint core files, but not libs
["core/**/*.js", "!**/assets/lib/**/*.js"]
]
},
// Unit test all the things!
nodeunit: {
all: ['core/test/ghost/**/test-*.js'],
api: ['core/test/ghost/test-api.js']
},
// Compile all the SASS!
sass: {
admin: {
files: {
'core/admin/assets/css/screen.css': 'core/admin/assets/sass/screen.scss'
}
}
},
shell: {
bourbon: {
command: 'bourbon install --path core/admin/assets/sass/modules/'
}
}
};
grunt.initConfig(cfg);
grunt.loadNpmTasks("grunt-jslint");
grunt.loadNpmTasks("grunt-contrib-nodeunit");
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-shell");
// Prepare the project for development
// TODO: Git submodule init/update (https://github.com/jaubourg/grunt-update-submodules)?
grunt.registerTask("init", ["shell:bourbon", "sass:admin"]);
// Run API tests only
grunt.registerTask("test-api", ["nodeunit:api"]);
// Run tests and lint code
grunt.registerTask("validate", ["jslint", "nodeunit:all"]);
};
module.exports = configureGrunt;
}());