burnchart/Gruntfile.coffee

100 lines
3.2 KiB
CoffeeScript
Raw Normal View History

2014-08-29 02:55:45 +00:00
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
apps_c:
2014-08-30 17:17:46 +00:00
loader:
dest: 'public/js/commonjs.js'
2014-08-29 02:55:45 +00:00
commonjs:
2014-08-30 17:17:46 +00:00
src: [ 'src/**/*.{coffee,js,json,mustache}' ]
dest: 'public/js/app.js'
2014-08-29 02:55:45 +00:00
options:
main: 'src/app.coffee'
2014-08-30 17:17:46 +00:00
loader: no
2014-08-29 02:55:45 +00:00
stylus:
compile:
2014-08-29 03:52:45 +00:00
src: [
'src/styles/fonts.styl'
'src/styles/icons.styl'
'src/styles/chart.styl'
2014-09-26 02:57:55 +00:00
'src/styles/notification.styl'
2014-08-29 03:52:45 +00:00
'src/styles/app.styl'
]
2014-08-30 17:17:46 +00:00
dest: 'public/css/app.css'
2014-08-29 02:55:45 +00:00
concat:
scripts:
src: [
2014-08-30 17:17:46 +00:00
# CommonJS loader.
'public/js/commonjs.js'
2014-08-29 02:55:45 +00:00
# Vendor dependencies.
'vendor/lodash/dist/lodash.js'
'vendor/ractive/ractive.js'
'vendor/ractive-adaptor/adaptor.js'
2014-08-30 17:17:46 +00:00
'vendor/firebase/firebase.js'
2014-08-30 16:00:11 +00:00
'vendor/firebase-simple-login/firebase-simple-login.js'
2014-09-14 20:14:57 +00:00
'vendor/superagent/superagent.js'
'vendor/localforage/dist/localforage.js'
2014-09-14 20:14:57 +00:00
'vendor/async/lib/async.js'
'vendor/moment/moment.js'
2014-09-18 03:00:01 +00:00
'vendor/d3/d3.js'
'vendor/d3-tip/index.js'
'vendor/marked/lib/marked.js'
2014-09-27 03:17:06 +00:00
'vendor/director/build/director.js'
2014-08-29 02:55:45 +00:00
# Our app.
2014-08-30 17:17:46 +00:00
'public/js/app.js'
2014-08-29 02:55:45 +00:00
]
2014-08-30 17:17:46 +00:00
dest: 'public/js/app.bundle.js'
2014-08-29 02:55:45 +00:00
options:
separator: ';' # for minification purposes
styles:
src: [
# Vendor dependencies.
'vendor/normalize-css/normalize.css'
# Our style.
2014-08-30 17:17:46 +00:00
'public/css/app.css'
2014-08-29 02:55:45 +00:00
]
2014-08-30 17:17:46 +00:00
dest: 'public/css/app.bundle.css'
2014-08-29 02:55:45 +00:00
uglify:
scripts:
files:
2014-08-30 17:17:46 +00:00
'public/js/app.min.js': 'public/js/app.js'
'public/js/app.bundle.min.js': 'public/js/app.bundle.js'
2014-08-29 02:55:45 +00:00
cssmin:
combine:
files:
2014-08-30 17:17:46 +00:00
'public/css/app.min.css': 'public/css/app.css'
'public/css/app.bundle.min.css': 'public/css/app.bundle.css'
2014-08-29 02:55:45 +00:00
2014-09-14 16:33:15 +00:00
watch:
scripts:
files: "src/**/*.*"
tasks: [ "default" ]
options:
interrupt: true # interrupt build when a file has changed?
debounceDelay: 250 # delay a bit
livereload: true
2014-08-29 02:55:45 +00:00
grunt.loadNpmTasks('grunt-apps-c')
grunt.loadNpmTasks('grunt-contrib-stylus')
grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-contrib-cssmin')
2014-09-14 16:33:15 +00:00
grunt.loadNpmTasks('grunt-contrib-watch')
2014-08-29 02:55:45 +00:00
grunt.registerTask('default', [
'apps_c'
'stylus'
'concat'
])
grunt.registerTask('minify', [
'uglify'
'cssmin'
])