2015-01-28 06:37:21 +00:00
|
|
|
/*global module:false*/
|
|
|
|
module.exports = function(grunt) {
|
|
|
|
|
|
|
|
var version = '1.7.7';
|
|
|
|
// before release:
|
|
|
|
// update bower.json, package.json
|
|
|
|
// after release:
|
|
|
|
// add tag to repo: git tag -a 1.6.0 -m 'i18next v1.6.0'
|
|
|
|
// push tag: git push origin 1.6.0
|
|
|
|
// npm publish
|
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-rigger');
|
|
|
|
grunt.loadNpmTasks('grunt-shell');
|
2015-01-28 07:01:14 +00:00
|
|
|
grunt.loadNpmTasks('grunt-sass');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
2015-01-28 20:52:16 +00:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-requirejs');
|
2015-01-28 23:52:28 +00:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
2015-01-28 06:37:21 +00:00
|
|
|
|
|
|
|
// Project configuration.
|
|
|
|
grunt.initConfig({
|
|
|
|
rig: {
|
|
|
|
standalone: {
|
|
|
|
src: ['javascripts/jquery.datetimepicker.js'],
|
2015-01-28 23:52:28 +00:00
|
|
|
dest: 'dist/javascripts/jquery.datetimepicker.js'
|
2015-01-28 06:37:21 +00:00
|
|
|
},
|
|
|
|
moment: {
|
|
|
|
src: ['javascripts/jquery.moment.datetimepicker.js'],
|
2015-01-28 23:52:28 +00:00
|
|
|
dest: 'dist/javascripts/jquery.moment.datetimepicker.js'
|
2015-01-28 20:52:16 +00:00
|
|
|
},
|
|
|
|
mousewheel: {
|
|
|
|
src: ['javascripts/import.mousewheel.js'],
|
|
|
|
dest: 'bin/jquery.mousewheel.js'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
requirejs: {
|
|
|
|
compile: {
|
|
|
|
options: {
|
|
|
|
baseUrl: "./bin/",
|
|
|
|
name: "jquery.mousewheel",
|
|
|
|
out: "./bin/jquery.mousewheel.js",
|
|
|
|
paths: {
|
|
|
|
"jquery.mousewheel": "./jquery.mousewheel",
|
|
|
|
'jquery':'empty:'
|
|
|
|
},
|
|
|
|
optimize:'none'
|
2015-01-28 23:52:28 +00:00
|
|
|
}
|
2015-01-28 06:37:21 +00:00
|
|
|
}
|
|
|
|
},
|
2015-01-28 07:01:14 +00:00
|
|
|
copy:{
|
|
|
|
sass:{
|
|
|
|
files:[
|
2015-01-28 23:52:28 +00:00
|
|
|
{src:'stylesheets/jquery.datetimepicker.scss',dest:'dist/stylesheets/jquery.datetimepicker.scss'},
|
|
|
|
{src:'stylesheets/_options.scss',dest:'dist/stylesheets/_options.scss'}
|
2015-01-28 07:01:14 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
sass: {
|
|
|
|
options: {
|
|
|
|
sourceMap: true
|
|
|
|
},
|
|
|
|
dist: {
|
|
|
|
files: {
|
2015-01-28 23:52:28 +00:00
|
|
|
'dist/stylesheets/jquery.datetimepicker.css': 'dist/stylesheets/jquery.datetimepicker.scss'
|
2015-01-28 07:01:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2015-01-28 06:37:21 +00:00
|
|
|
uglify: {
|
|
|
|
standalone: {
|
2015-01-28 23:52:28 +00:00
|
|
|
src: ['dist/javascripts/jquery.datetimepicker.js'],
|
|
|
|
dest: 'dist/javascripts/jquery.datetimepicker.min.js'
|
2015-01-28 06:37:21 +00:00
|
|
|
},
|
|
|
|
moment: {
|
2015-01-28 23:52:28 +00:00
|
|
|
src: ['dist/javascripts/jquery.moment.datetimepicker.js'],
|
|
|
|
dest: 'dist/javascripts/jquery.moment.datetimepicker.min.js'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
cssmin: {
|
|
|
|
target: {
|
|
|
|
files: {
|
|
|
|
'dist/stylesheets/jquery.datetimepicker.min.css': ['dist/stylesheets/jquery.datetimepicker.css', 'bar.css']
|
|
|
|
}
|
2015-01-28 06:37:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Default task.
|
2015-01-28 20:52:16 +00:00
|
|
|
grunt.registerTask('default', ['rig:moment','rig:mousewheel', 'requirejs','rig:standalone', 'copy', 'sass']);
|
2015-01-28 23:52:28 +00:00
|
|
|
grunt.registerTask('release', ['default', 'uglify','cssmin']);
|
2015-01-28 06:37:21 +00:00
|
|
|
};
|