From b85ff1e702c0e2c97e7c416af2dd0bb1c54118c1 Mon Sep 17 00:00:00 2001 From: Adam Pearce <1wheel@gmail.com> Date: Fri, 5 Jun 2015 01:24:19 -0400 Subject: [PATCH] adds css concat, closes #37 --- .gitignore | 3 +++ Gruntfile.js | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 32 ++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 .gitignore create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..66c736c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +.tmp/ +public/ \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..a81f86c --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,63 @@ +'use strict'; + +var request = require('request'); + +module.exports = function (grunt) { + // show elapsed time at the end + require('time-grunt')(grunt); + // load all grunt tasks + require('load-grunt-tasks')(grunt); + + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + + useminPrepare: { + html: ['index.html'], + options:{ + dest: 'public' + } + }, + usemin: { + html: ['public/index.html'], + }, + copy: { + html: { + files: [ + { src: 'index.html', dest: 'public/index.html' }, + ] + }, + images: { + files: [ + { expand: true, src: 'media/*.*', dest: 'public/' }, + { expand: true, src: 'images/*.*', dest: 'public/' }, + ] + }, + misc: { + files: [ + { expand: true, src: 'scripts/tracker.js', dest: 'public/' }, + ] + } + } + }); + + + // grunt.loadNpmTasks('grunt-filerev'); + // grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-usemin'); + + grunt.registerTask('build', [ + 'useminPrepare', + 'concat', + 'cssmin', + 'uglify', + 'copy', + 'usemin', + ]); + + + grunt.registerTask('default', ['build']); +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..280d19a --- /dev/null +++ b/package.json @@ -0,0 +1,32 @@ +{ + "name": "code-issue", + "description": "BW code issue", + "author": { + "name": "Adam Pearce", + "url": "http://roadtolarissa.com" + }, + "engines": { + "node": "0.12.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/bizweekgraphics/code.git" + }, + "dependencies": { + }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-develop": "~0.2.2", + "grunt-contrib-watch": "~0.5.3", + "request": "~2.27.0", + "time-grunt": "~0.1.1", + "load-grunt-tasks": "~0.2.0", + "grunt-contrib-stylus": "~0.15.0", + "grunt-contrib-uglify": "~0.4.0", + "grunt-contrib-concat": "^0.4.0", + "grunt-usemin": "^2.1.1", + "grunt-contrib-copy": "^0.5.0", + "grunt-contrib-cssmin": "^0.9.0", + "grunt-filerev": "^0.2.1" + } +}