|
|
@@ -12,6 +12,7 @@ module.exports = function(grunt) {
|
|
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
|
|
grunt.loadNpmTasks('grunt-jscs-checker');
|
|
|
+ grunt.loadNpmTasks('grunt-shell');
|
|
|
grunt.loadNpmTasks('grunt-karma');
|
|
|
grunt.loadNpmTasks('grunt-bump');
|
|
|
grunt.loadNpmTasks('lumbar');
|
|
|
@@ -23,6 +24,7 @@ module.exports = function(grunt) {
|
|
|
uglify: {},
|
|
|
copy: {},
|
|
|
compress: {},
|
|
|
+ shell: {},
|
|
|
clean: {
|
|
|
temp: 'build/temp'
|
|
|
}
|
|
|
@@ -46,6 +48,7 @@ module.exports = function(grunt) {
|
|
|
|
|
|
// Bare minimum for debugging
|
|
|
grunt.registerTask('dev', [
|
|
|
+ 'shell:assume-unchanged',
|
|
|
'lumbar:build',
|
|
|
'languages'
|
|
|
]);
|
|
|
@@ -374,6 +377,24 @@ module.exports = function(grunt) {
|
|
|
|
|
|
|
|
|
|
|
|
+ /* dist & git hacks
|
|
|
+ ----------------------------------------------------------------------------------------------------
|
|
|
+ // These shell commands are used to force/unforce git from thinking that files have changed.
|
|
|
+ // Used to ignore changes when dist files are overwritten, but not committed, during development.
|
|
|
+ */
|
|
|
+
|
|
|
+ config.shell['assume-unchanged'] = {
|
|
|
+ command: 'git update-index --assume-unchanged `git ls-files dist`'
|
|
|
+ };
|
|
|
+ config.shell['no-assume-unchanged'] = {
|
|
|
+ command: 'git update-index --no-assume-unchanged `git ls-files dist`'
|
|
|
+ };
|
|
|
+ config.shell['list-assume-unchanged'] = {
|
|
|
+ command: 'git ls-files -v | grep \'^h\''
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// finally, give grunt the config object...
|
|
|
grunt.initConfig(config);
|
|
|
|