burnchart/Gruntfile.coffee

80 lines
1.7 KiB
CoffeeScript
Raw Normal View History

2014-08-29 02:55:45 +00:00
module.exports = (grunt) ->
2014-10-18 03:32:48 +00:00
grunt.initConfig
2014-10-27 03:35:41 +00:00
2014-10-18 03:32:48 +00:00
pkg: grunt.file.readJSON("package.json")
2014-08-29 02:55:45 +00:00
2014-10-27 03:35:41 +00:00
'clean': [
2014-10-27 02:57:44 +00:00
'public/js'
'public/css'
]
2014-10-27 03:35:41 +00:00
'mkdir':
2014-10-27 02:57:44 +00:00
all:
options:
create: [
'public/js'
'public/css'
]
2014-10-27 03:35:41 +00:00
'stylus':
2014-10-27 02:57:44 +00:00
app:
2014-10-18 03:32:48 +00:00
src: [
'src/styles/fonts.styl'
'src/styles/icons.styl'
'src/styles/chart.styl'
'src/styles/notification.styl'
'src/styles/app.styl'
]
dest: 'public/css/app.css'
2014-08-29 02:55:45 +00:00
2014-10-27 03:35:41 +00:00
'concat':
css:
2014-10-18 03:32:48 +00:00
src: [
# Vendor dependencies.
2014-10-27 03:10:41 +00:00
'node_modules/normalize.css/normalize.css'
2014-10-18 03:32:48 +00:00
# Our style.
'public/css/app.css'
]
dest: 'public/css/app.bundle.css'
2014-08-29 02:55:45 +00:00
2014-10-27 03:35:41 +00:00
'uglify':
2014-10-27 02:57:44 +00:00
bundle:
files:
2014-10-27 03:10:41 +00:00
'public/js/app.bundle.min.js': 'public/js/app.bundle.js'
2014-10-27 02:57:44 +00:00
2014-10-27 03:35:41 +00:00
'cssmin':
2014-10-27 02:57:44 +00:00
bundle:
files:
'public/css/app.min.css': 'public/css/app.css'
'public/css/app.bundle.min.css': 'public/css/app.bundle.css'
2014-10-27 03:35:41 +00:00
'gh-pages':
options:
base: 'public'
src: ['**']
2014-10-27 02:57:44 +00:00
grunt.loadNpmTasks('grunt-mkdir')
grunt.loadNpmTasks('grunt-contrib-clean')
2014-10-18 03:32:48 +00:00
grunt.loadNpmTasks('grunt-contrib-stylus')
grunt.loadNpmTasks('grunt-contrib-concat')
2014-10-27 02:57:44 +00:00
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-contrib-cssmin')
2014-10-27 03:35:41 +00:00
grunt.loadNpmTasks('grunt-gh-pages');
2014-08-29 02:55:45 +00:00
2014-10-27 02:57:44 +00:00
# Stylus to CSS, concat JS libs and all CSS.
2014-10-18 03:32:48 +00:00
grunt.registerTask('default', [
2014-10-27 02:57:44 +00:00
'stylus:app'
'concat:css'
])
# Cleanup public directories.
grunt.registerTask('init', [
'clean'
'mkdir'
])
# Minify JS, CSS and concat JS.
grunt.registerTask('minify', [
2014-10-27 03:10:41 +00:00
'uglify'
'cssmin'
2014-10-18 03:32:48 +00:00
])