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/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'
|
2014-09-01 00:22:29 +00:00
|
|
|
'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-02 03:28:28 +00:00
|
|
|
'vendor/grapnel/src/grapnel.js'
|
2014-09-03 02:42:11 +00:00
|
|
|
'vendor/github/lib/base64.js'
|
|
|
|
'vendor/github/github.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
|
|
|
|
|
|
|
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')
|
|
|
|
|
|
|
|
grunt.registerTask('default', [
|
|
|
|
'apps_c'
|
|
|
|
'stylus'
|
|
|
|
'concat'
|
|
|
|
])
|
|
|
|
|
|
|
|
grunt.registerTask('minify', [
|
|
|
|
'uglify'
|
|
|
|
'cssmin'
|
|
|
|
])
|