Skip to content

Instantly share code, notes, and snippets.

@amster
Created March 30, 2014 01:12
Show Gist options
  • Save amster/9865720 to your computer and use it in GitHub Desktop.
Save amster/9865720 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
exec:{
build:{
command:"phonegap build ios",
stdout:true,
stderror:true
}
},
sass: {
dist: {
files: {
'www/css/app.css': 'www/sass/app.scss'
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'src/<%= pkg.name %>.js',
dest: 'build/<%= pkg.name %>.min.js'
}
},
watch: {
css: {
files: ['www/sass/app.scss'],
tasks: ['sass']
},
www: {
files: ['www/css/app.css', 'www/**/*.html', 'www/**/*.js', 'www/**/*.jpg', 'www/**/*.png', 'www/**/*.gif'],
tasks: ['exec:build']
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-sass');
grunt.registerTask('default', ['sass', 'exec:build', 'watch']);
// Uglify isn't currently used.
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment