Created
March 30, 2014 01:12
-
-
Save amster/9865720 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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