Skip to content

Instantly share code, notes, and snippets.

@eastridge
Created October 4, 2013 22:25
Show Gist options
  • Save eastridge/6833855 to your computer and use it in GitHub Desktop.
Save eastridge/6833855 to your computer and use it in GitHub Desktop.
// Place in project root where jboss and ATG folder are
// `npm install grunt-contrib-copy`
// `npm install grunt-contrib-watch`
// grunt
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
copy: {
jsp: {
files: [
{
expand: true,
cwd: 'wmt/usd-estore/j2ee-apps/usd-estore/usd-estore.war/',
src: ['**/*.jsp'],
dest: 'jboss-4.0.5.GA/server/atg/deploy/usd-estore.war'
}
]
},
scripts: {
files: [
{
expand: true,
cwd: 'wmt/usd-estore/j2ee-apps/usd-estore/usd-estore.war/js/',
src: ['**'],
dest: 'jboss-4.0.5.GA/server/atg/deploy/js.war'
}
]
},
styles: {
files: [
{
expand: true,
cwd: 'wmt/usd-estore/j2ee-apps/usd-estore/usd-estore.war/css/',
src: ['**'],
dest: 'jboss-4.0.5.GA/server/atg/deploy/css.war'
}
]
}
},
watch: {
scripts: {
files: 'wmt/usd-estore/j2ee-apps/usd-estore/usd-estore.war/**/*.jsp',
tasks: ['copy:jsp']
},
scripts: {
files: 'wmt/usd-estore/j2ee-apps/usd-estore/usd-estore.war/js/**',
tasks: ['copy:scripts']
},
styles: {
files: 'wmt/usd-estore/j2ee-apps/usd-estore/usd-estore.war/css/**',
tasks: ['copy:styles']
}
}
});
grunt.registerTask('default', ['copy:scripts', 'copy:styles', 'copy:jsp','watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment