From b791bc7c80eb726f53cc5ae3c8c6c2c9a88ca5d6 Mon Sep 17 00:00:00 2001 From: Radek Stepan Date: Sun, 26 Oct 2014 21:35:41 -0600 Subject: [PATCH] publish to github pages script --- Gruntfile.coffee | 19 +++++++++++++------ Makefile | 2 +- package.json | 3 ++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 1b335a3..e14061e 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,13 +1,14 @@ module.exports = (grunt) -> grunt.initConfig + pkg: grunt.file.readJSON("package.json") - clean: [ + 'clean': [ 'public/js' 'public/css' ] - mkdir: + 'mkdir': all: options: create: [ @@ -15,7 +16,7 @@ module.exports = (grunt) -> 'public/css' ] - stylus: + 'stylus': app: src: [ 'src/styles/fonts.styl' @@ -26,7 +27,7 @@ module.exports = (grunt) -> ] dest: 'public/css/app.css' - concat: + 'concat': css: src: [ # Vendor dependencies. @@ -36,23 +37,29 @@ module.exports = (grunt) -> ] dest: 'public/css/app.bundle.css' - uglify: + 'uglify': bundle: files: 'public/js/app.bundle.min.js': 'public/js/app.bundle.js' - cssmin: + 'cssmin': bundle: files: 'public/css/app.min.css': 'public/css/app.css' 'public/css/app.bundle.min.css': 'public/css/app.bundle.css' + 'gh-pages': + options: + base: 'public' + src: ['**'] + grunt.loadNpmTasks('grunt-mkdir') grunt.loadNpmTasks('grunt-contrib-clean') grunt.loadNpmTasks('grunt-contrib-stylus') grunt.loadNpmTasks('grunt-contrib-concat') grunt.loadNpmTasks('grunt-contrib-uglify') grunt.loadNpmTasks('grunt-contrib-cssmin') + grunt.loadNpmTasks('grunt-gh-pages'); # Stylus to CSS, concat JS libs and all CSS. grunt.registerTask('default', [ diff --git a/Makefile b/Makefile index e017c46..a80436f 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ build: # Publish on Firebase or GitHub Pages. publish: # firebase deploy -> http://burnchart.firebaseapp.com - git subtree push --prefix public origin gh-pages + grunt gh-pages # Run mocha test. test: diff --git a/package.json b/package.json index 984d6df..8865332 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,14 @@ "test": "make test" }, "devDependencies": { - "grunt": "~0.4.1", + "grunt": "~0.4.5", "grunt-mkdir": "~0.1.2", "grunt-contrib-clean": "~0.6.0", "grunt-contrib-stylus": "~0.9.0", "grunt-contrib-concat": "~0.5.0", "grunt-contrib-uglify": "~0.6.0", "grunt-contrib-cssmin": "~0.10.0", + "grunt-gh-pages": "~0.9.1", "coffeeify": "~0.7.0L", "ractivate": "~0.2.0", "browserify": "~6.1.0",