publish to github pages script

This commit is contained in:
Radek Stepan 2014-10-26 21:35:41 -06:00
parent 1bb035c426
commit b791bc7c80
3 changed files with 16 additions and 8 deletions

View File

@ -1,13 +1,14 @@
module.exports = (grunt) -> module.exports = (grunt) ->
grunt.initConfig grunt.initConfig
pkg: grunt.file.readJSON("package.json") pkg: grunt.file.readJSON("package.json")
clean: [ 'clean': [
'public/js' 'public/js'
'public/css' 'public/css'
] ]
mkdir: 'mkdir':
all: all:
options: options:
create: [ create: [
@ -15,7 +16,7 @@ module.exports = (grunt) ->
'public/css' 'public/css'
] ]
stylus: 'stylus':
app: app:
src: [ src: [
'src/styles/fonts.styl' 'src/styles/fonts.styl'
@ -26,7 +27,7 @@ module.exports = (grunt) ->
] ]
dest: 'public/css/app.css' dest: 'public/css/app.css'
concat: 'concat':
css: css:
src: [ src: [
# Vendor dependencies. # Vendor dependencies.
@ -36,23 +37,29 @@ module.exports = (grunt) ->
] ]
dest: 'public/css/app.bundle.css' dest: 'public/css/app.bundle.css'
uglify: 'uglify':
bundle: bundle:
files: files:
'public/js/app.bundle.min.js': 'public/js/app.bundle.js' 'public/js/app.bundle.min.js': 'public/js/app.bundle.js'
cssmin: 'cssmin':
bundle: bundle:
files: files:
'public/css/app.min.css': 'public/css/app.css' 'public/css/app.min.css': 'public/css/app.css'
'public/css/app.bundle.min.css': 'public/css/app.bundle.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-mkdir')
grunt.loadNpmTasks('grunt-contrib-clean') grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-stylus') grunt.loadNpmTasks('grunt-contrib-stylus')
grunt.loadNpmTasks('grunt-contrib-concat') grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-uglify') grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-contrib-cssmin') grunt.loadNpmTasks('grunt-contrib-cssmin')
grunt.loadNpmTasks('grunt-gh-pages');
# Stylus to CSS, concat JS libs and all CSS. # Stylus to CSS, concat JS libs and all CSS.
grunt.registerTask('default', [ grunt.registerTask('default', [

View File

@ -20,7 +20,7 @@ build:
# Publish on Firebase or GitHub Pages. # Publish on Firebase or GitHub Pages.
publish: publish:
# firebase deploy -> http://burnchart.firebaseapp.com # firebase deploy -> http://burnchart.firebaseapp.com
git subtree push --prefix public origin gh-pages grunt gh-pages
# Run mocha test. # Run mocha test.
test: test:

View File

@ -20,13 +20,14 @@
"test": "make test" "test": "make test"
}, },
"devDependencies": { "devDependencies": {
"grunt": "~0.4.1", "grunt": "~0.4.5",
"grunt-mkdir": "~0.1.2", "grunt-mkdir": "~0.1.2",
"grunt-contrib-clean": "~0.6.0", "grunt-contrib-clean": "~0.6.0",
"grunt-contrib-stylus": "~0.9.0", "grunt-contrib-stylus": "~0.9.0",
"grunt-contrib-concat": "~0.5.0", "grunt-contrib-concat": "~0.5.0",
"grunt-contrib-uglify": "~0.6.0", "grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-cssmin": "~0.10.0", "grunt-contrib-cssmin": "~0.10.0",
"grunt-gh-pages": "~0.9.1",
"coffeeify": "~0.7.0L", "coffeeify": "~0.7.0L",
"ractivate": "~0.2.0", "ractivate": "~0.2.0",
"browserify": "~6.1.0", "browserify": "~6.1.0",