Commit e302b171 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Add grunt build script

parent 6dc3ef35
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: grunt.file.readJSON('bower.json'),
bump: {
options: {
files: ['package.json', 'bower.json'],
updateConfigs: ['pkg', 'bower'],
commit: false,
commitMessage: 'Release v%VERSION%',
commitFiles: ['package.json', 'bower.json'],
createTag: false,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
prereleaseName: 'rc',
push: false,
pushTo: 'origin',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
globalReplace: false,
regExp: false
}
},
jshint: {
// define the files to lint
files: ['gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
// configure JSHint (documented at http://www.jshint.com/docs/)
options: {
// more options here if you want to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true
}
}
},
qunit: {
files: ['test/index.html']
},
shell: {
rjs: {
command: 'node_modules/requirejs/bin/r.js -o etc/build.js'
},
rjs_min: {
command: 'node_modules/requirejs/bin/r.js -o etc/build-min.js'
},
bower: {
command: "node_modules/bower/bin/bower --allow-root install"
}
}
});
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-requirejs');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('test', ['jshint', 'qunit', 'requirejs']);
grunt.registerTask('build', ['shell:bower', 'jshint', /*'qunit',*/ 'shell:rjs', 'shell:rjs_min']);
grunt.registerTask('default', ['shell:bower', 'jshint', 'qunit']);
grunt.registerTask('publish-patch', ['jshint', 'qunit', 'requirejs', 'bump:patch']);
};
\ No newline at end of file
{
"name": "uninett-theme",
"version": "1.0.0",
"description": "UNINETT Theme",
"scripts": {
"test": "node_modules/grunt-cli/bin/grunt test --verbose"
},
"keywords": [
"oauth",
"authentication",
"authorization",
"rest",
"api",
"ajax",
"jquery"
],
"devDependencies": {
"grunt-cli": "*",
"grunt": "~0.4.5",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt-requirejs": "*",
"grunt-contrib-qunit": "*",
"grunt-bump": "^0.3.1",
"grunt-shell": "*",
"bower": "~1.4.1",
"requirejs": "~2.1.16",
"almond": "^0.3.0"
},
"author": "Andreas Åkre Solberg",
"homepage": "https://mal.uninett.no"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment