You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.6 KiB
JavaScript

1 month ago
var matchdep = require('matchdep');
module.exports = function (grunt) {
grunt.initConfig({
project: {
src: 'src'
},
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: '<%= project.src %>/js/rulez.js',
dest: 'dist/js/rulez.min.js'
}
},
cssmin: {
target: {
files: [{
expand: true,
cwd: 'src/css',
src: ['*.css', '!*.min.css'],
dest: 'dist/css',
ext: '.min.css'
}]
}
},
jshint: {
options: {
jshintrc: '.jshintrc',
'no-use-before-define': 0,
reporter: require('jshint-stylish')
},
all: [
'gruntfile.js',
'<%= project.src %>/**/*.js'
],
grunt: 'gruntfile.js'
},
bump: {
options: {
files: ['package.json', 'bower.json'],
updateConfigs: [],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['package.json', 'bower.json'],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'upstream',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
globalReplace: false
}
},
jsdoc : {
dist : {
src: ['src/js/*.js'],
options: {
destination: 'doc'
}
}
}
});
matchdep.filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Default task(s).
grunt.registerTask('default', ['jshint','uglify', 'cssmin', 'jsdoc']);
};