From f5e8e323597cf4655b5967a2c372d10e9f05782b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 25 Sep 2015 12:36:32 -0400 Subject: grunt --- .gitignore | 1 + Gruntfile.js | 49 +++++++++++++++++++++++++++++++++++++ package.json | 4 +++ public/dev.html | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ public/index.html | 13 ++-------- public/js/app.min.js | 0 6 files changed, 125 insertions(+), 11 deletions(-) create mode 100644 Gruntfile.js create mode 100644 public/dev.html create mode 100644 public/js/app.min.js diff --git a/.gitignore b/.gitignore index 2eda261..7fe4f4c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ node_modules/ dist *.sql .env +app.concat.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..35ef388 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,49 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + concat: { + js: { + options: { + separator: "\n;\n" + }, + src: [ + "public/js/vendor/lodash.min.js", + "public/js/vendor/util.js", + "public/js/vendor/view/view.js", + "public/js/vendor/view/uploadview.js", + "public/js/drag.js", + "public/js/nav.js", + "public/js/index.js", + ], + dest: 'public/js/app.concat.js' + }, + }, + + uglify: { + options: { + }, + index: { + src: 'public/js/app.concat.js', + dest: 'public/js/app.min.js' + }, + }, + + clean: { + release: [ + "dist/app.concat.js", + ], + }, + }); + + // Load tasks that we'll be using + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-dentist'); + + // Default task(s). + // grunt.registerTask('default', ['dentist', 'concat', 'uglify', 'copy', 'clean']); + grunt.registerTask('default', ['concat', 'uglify', 'clean']); +}; diff --git a/package.json b/package.json index 32bfa35..37b5a9c 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,10 @@ "ejs": "^2.3.4", "express": "^4.13.3", "express-json": "^1.0.0", + "grunt": "^0.4.5", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-concat": "^0.5.1", + "grunt-contrib-uglify": "^0.9.2", "knex": "^0.8.6", "knox": "^0.9.2", "lodash": "^3.10.1", diff --git a/public/dev.html b/public/dev.html new file mode 100644 index 0000000..20a7830 --- /dev/null +++ b/public/dev.html @@ -0,0 +1,69 @@ + + + +LuCkYPLoP™ + + + + + + + + + + + +
+ +
+ + + + Rfsh   + RNDM + +
+ + + + + +
+ + Step 1.drag an image into luckyplop! - + Step 2.see if you won! - + 3.Share the image on friendster, grindr, twitter, myspace or facebook! + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/public/index.html b/public/index.html index 2e0bf79..25d82ed 100644 --- a/public/index.html +++ b/public/index.html @@ -56,16 +56,7 @@ - - - - - - - - - - - + + diff --git a/public/js/app.min.js b/public/js/app.min.js new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3-70-g09d2