Ghost/Gruntfile.js

58 lines
1.7 KiB
JavaScript
Raw Normal View History

2013-05-14 19:04:22 +04:00
(function () {
"use strict";
var configureGrunt = function (grunt) {
var cfg = {
// JSLint all the things!
jslint: {
directives: {
node: true,
browser: true,
2013-05-14 19:04:22 +04:00
nomen: true,
todo: true
2013-05-14 19:04:22 +04:00
},
files: [
// Lint files in the root, including Gruntfile.js
"*.js",
// Lint core files, but not libs
["core/**/*.js", "!**/assets/lib/**/*.js"]
]
},
2013-05-14 19:04:22 +04:00
// Unit test all the things!
nodeunit: {
2013-05-20 08:22:00 +04:00
all: ['core/test/ghost/**/test-*.js'],
api: ['core/test/ghost/test-api.js']
},
2013-05-14 19:04:22 +04:00
// Compile all the SASS!
compass: {
options: {
config: "config.rb"
},
// No need for config, but separated for future options
admin: {}
}
};
2013-05-14 19:04:22 +04:00
grunt.initConfig(cfg);
2013-05-14 19:04:22 +04:00
grunt.loadNpmTasks("grunt-jslint");
grunt.loadNpmTasks("grunt-contrib-nodeunit");
grunt.loadNpmTasks("grunt-contrib-compass");
// Prepare the project for development
// TODO: Git submodule init/update (https://github.com/jaubourg/grunt-update-submodules)?
grunt.registerTask("init", ["compass:admin"]);
2013-05-20 08:22:00 +04:00
// Run API tests only
grunt.registerTask("test-api", ["nodeunit:api"]);
2013-05-14 19:04:22 +04:00
// Run tests and lint code
grunt.registerTask("validate", ["jslint", "nodeunit:all"]);
};
2013-05-14 19:04:22 +04:00
module.exports = configureGrunt;
2013-05-12 17:40:59 +04:00
2013-05-14 19:04:22 +04:00
}());