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) ->
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', [

View File

@ -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:

View File

@ -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",