From cbd0f30070503ab05aa310ada580bbffb710ecd7 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 15 Apr 2014 15:14:14 -0400 Subject: [PATCH] Start work on getting grunt setup for the Quay frontend. Note that this change is NOT working code --- .gitignore | 3 +++ grunt/Gruntfile.js | 29 +++++++++++++++++++++++++++++ grunt/package.json | 10 ++++++++++ 3 files changed, 42 insertions(+) create mode 100644 grunt/Gruntfile.js create mode 100644 grunt/package.json diff --git a/.gitignore b/.gitignore index 390030af1..b298386e5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ venv static/snapshots/ screenshots/screenshots/ stack +grunt/node_modules +dist +dest diff --git a/grunt/Gruntfile.js b/grunt/Gruntfile.js new file mode 100644 index 000000000..12384ed2d --- /dev/null +++ b/grunt/Gruntfile.js @@ -0,0 +1,29 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + concat: { + options: { + process: function(src, filepath) { + return '// Source: ' + filepath + '\n' + + '(function() {\n' + src + '\n})();\n'; + }, + }, + build: { + src: ['../static/lib/**/*.js', '../static/js/*.js', '!../static/lib/jquery.overscroll.min.js'], + dest: '../dest/<%= pkg.name %>.js' + } + }, + + cssmin: { + '../dest/<%= pkg.name %>.css': ['../static/lib/**/*.css', '../static/css/*.css'] + } + }); + + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + + // Default task(s). + grunt.registerTask('default', ['concat', 'cssmin']); +}; \ No newline at end of file diff --git a/grunt/package.json b/grunt/package.json new file mode 100644 index 000000000..51c159b04 --- /dev/null +++ b/grunt/package.json @@ -0,0 +1,10 @@ +{ + "name": "quay-frontend", + "version": "0.1.0", + "devDependencies": { + "grunt": "~0.4.4", + "grunt-contrib-concat": "~0.4.0", + "grunt-contrib-cssmin": "~0.9.0", + "grunt-angular-templates": "~0.5.4" + } +}