summaryrefslogtreecommitdiff
path: root/Gruntfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js67
1 files changed, 67 insertions, 0 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..1618caa
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,67 @@
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ dentist: {
+ options: {
+ include_js: "app.min.js",
+ include_css: "app.css",
+ clean_scripts: true,
+ },
+ build: {
+ src: 'falling/index.html',
+ dest_js: 'app.init.js',
+ dest_css: 'app.css',
+ dest_html: 'index.html'
+ }
+ },
+ concat: {
+ options: {
+ separator: ";"
+ },
+ build: {
+ src: [
+ "js/vendor/jquery-1.10.2.min.js",
+ "js/vendor/jquery-nodoubletapzoom.js",
+ "js/vendor/mx.min.js",
+ "js/vendor/mx.gyroControl.js",
+ "js/vendor/mx.rotationControl.js",
+ "js/vendor/mx.scene.js",
+ "js/util.js",
+ "js/image.js",
+ "app.init.js",
+ ],
+ dest: 'app.concat.js',
+ }
+ },
+ uglify: {
+ options: {
+ banner: '/* asdf.us/trees */\n'
+ },
+ build: {
+ src: 'app.concat.js',
+ dest: 'app.min.js'
+ }
+ },
+ clean: {
+ release: ["app.concat.js","app.init.js"],
+ },
+ watch: {
+ files: ['!(app.min|app.concat).js'],
+ tasks: ['default']
+ }
+ });
+
+ // Load tasks that we'll be using
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-clean');
+ grunt.loadNpmTasks('grunt-contrib-copy');
+ grunt.loadNpmTasks('grunt-dentist');
+
+ // Default task(s).
+ grunt.registerTask('build', ['dentist:build', 'concat:build', 'uglify:build']);
+ grunt.registerTask('default', ['build', 'clean:release']);
+};