Skip to content

Commit

Permalink
updated grunt tasks names
Browse files Browse the repository at this point in the history
  • Loading branch information
shanti2530 committed Jun 18, 2014
1 parent 80d2f1f commit 31a7074
Showing 1 changed file with 82 additions and 82 deletions.
164 changes: 82 additions & 82 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
module.exports = function(grunt) {

require("load-grunt-tasks")(grunt);
require("load-grunt-tasks")(grunt);

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

jshint: {
chromeextension: ['src/chrome-extension/*.js', 'src/*.js', 'chrome-extension/*.js'],
options: {
jshintrc: ".jshintrc"
}
},
copy: {
chromeextension: {
files: [
{src: 'src/*', dest: 'gen/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/*.js', dest: 'gen/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/*.json', dest: 'dist/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/scripts/*.js', dest: 'gen/chrome-extension/scripts/', flatten: true, expand:true, filter: 'isFile'}
]
},
chromeextensiondist: {
files: [
{src: 'gen/chrome-extension/*.png', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/*.html', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/*.css', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/background.js', dest: 'dist/chrome-extension/background.js'},
{src: 'gen/chrome-extension/options.js', dest: 'dist/chrome-extension/options.js'},
{src: 'gen/chrome-extension/scripts/*.js', dest: 'dist/chrome-extension/scripts/', flatten: true, expand: true},
{src: 'bower_components/momentjs/min/moment.min.js', dest: 'dist/chrome-extension/scripts/moment.min.js'}
]
}
},
includes: {
chromeextension: {
src: ["gen/chrome-extension/*.js"],
dest: "gen/chrome-extension",
flatten: true
}
},
uglify: {
chromeextension: {
files: {
'dist/chrome-extension/scripts/fillForms.min.js': ['gen/chrome-extension/fillForms.js']
}
},
options: {
mangle: false,
banner: "javascript:"
}
},
uncss: {
chromeextension: {
files: {
'gen/chrome-extension/tidy.css': ['src/chrome-extension/options.html']
}
}
},
processhtml: {
chromeextension: {
files: {
'gen/chrome-extension/options.html': ['src/chrome-extension/options.html']
}
}
},
watch: {
chromeextension: {
files: ['**/*.js', '**/*.html', '**/*.css', '**/*.json'],
tasks: ['chromeextensionBuild'],
options: {
spawn: false
}
}
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

jshint: {
chromeextension: ['src/chrome-extension/*.js', 'src/*.js', 'chrome-extension/*.js'],
options: {
jshintrc: ".jshintrc"
}
},
copy: {
chromeextension: {
files: [
{src: 'src/*', dest: 'gen/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/*.js', dest: 'gen/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/*.json', dest: 'dist/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/scripts/*.js', dest: 'gen/chrome-extension/scripts/', flatten: true, expand:true, filter: 'isFile'}
]
},
chromeextensiondist: {
files: [
{src: 'gen/chrome-extension/*.png', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/*.html', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/*.css', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/background.js', dest: 'dist/chrome-extension/background.js'},
{src: 'gen/chrome-extension/options.js', dest: 'dist/chrome-extension/options.js'},
{src: 'gen/chrome-extension/scripts/*.js', dest: 'dist/chrome-extension/scripts/', flatten: true, expand: true},
{src: 'bower_components/momentjs/min/moment.min.js', dest: 'dist/chrome-extension/scripts/moment.min.js'}
]
}
},
includes: {
chromeextension: {
src: ["gen/chrome-extension/*.js"],
dest: "gen/chrome-extension",
flatten: true
}
},
uglify: {
chromeextension: {
files: {
'dist/chrome-extension/scripts/fillForms.min.js': ['gen/chrome-extension/fillForms.js']
}
},
options: {
mangle: false,
banner: "javascript:"
}
},
uncss: {
chromeextension: {
files: {
'gen/chrome-extension/tidy.css': ['src/chrome-extension/options.html']
}
}
},
processhtml: {
chromeextension: {
files: {
'gen/chrome-extension/options.html': ['src/chrome-extension/options.html']
}
}
},
watch: {
chromeextension: {
files: ['**/*.js', '**/*.html', '**/*.css', '**/*.json'],
tasks: ['build'],
options: {
spawn: false
}
});
}
}
});

grunt.registerTask('chromeextensionBuild', ['uncss:chromeextension',
'copy:chromeextension',
'processhtml:chromeextension',
'includes:chromeextension',
'uglify:chromeextension',
'copy:chromeextensiondist',
'jshint:chromeextension']);
grunt.registerTask('build', ['uncss:chromeextension',
'copy:chromeextension',
'processhtml:chromeextension',
'includes:chromeextension',
'uglify:chromeextension',
'copy:chromeextensiondist',
'jshint:chromeextension']);

// Default task(s).
grunt.registerTask('chromeextension', ['chromeextensionBuild','watch:chromeextension']);
// Default task(s).
grunt.registerTask('serve', ['build','watch:chromeextension']);
};

0 comments on commit 31a7074

Please sign in to comment.