Skip to content

Instantly share code, notes, and snippets.

@alexsegura
Last active August 29, 2015 14:05
Show Gist options
  • Save alexsegura/1f655e99abbd53b8470f to your computer and use it in GitHub Desktop.
Save alexsegura/1f655e99abbd53b8470f to your computer and use it in GitHub Desktop.
Reloading a Cordova project with Grunt
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
src: {
files: ['www/**/*.html', 'www/**/*.js', 'www/**/*.css'],
tasks: ['shell']
}
},
shell: {
cordova_prepare: {
command: "cordova prepare"
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['watch']);
};
{
"name": "app_name",
"version": "1.0.0",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-watch": "^0.6.1",
"grunt-shell": "^1.0.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment