fmartingr
/
shelfzilla
Archived
1
0
Fork 0
This repository has been archived on 2021-06-29. You can view files and clone it, but cannot push or open issues or pull requests.
shelfzilla/gruntfile.coffee

85 lines
2.3 KiB
CoffeeScript
Raw Normal View History

2014-03-18 12:48:12 +00:00
module.exports = (grunt) ->
# Project
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
less:
options:
ieCompat: true
compress: true
development:
files:
"shelfzilla/themes/bootflat/static/css/style.css": "shelfzilla/themes/bootflat/static/less/style.less"
2014-03-18 12:48:12 +00:00
coffee:
development:
files:
'shelfzilla/themes/bootflat/static/js/main.full.js': 'shelfzilla/themes/bootflat/static/coffee/main.coffee'
2014-03-18 12:48:12 +00:00
concat:
options:
separator: ';'
base:
src: [
2014-03-19 10:55:34 +00:00
"shelfzilla/themes/bootflat/static/libs/bootflat/js/icheck.min.js",
"shelfzilla/themes/bootflat/static/js/main.full.js",
2014-03-18 12:48:12 +00:00
]
dest: "shelfzilla/themes/bootflat/static/js/site.js"
2014-03-18 12:48:12 +00:00
uglify:
development:
files:
'shelfzilla/themes/bootflat/static/js/site.js': 'shelfzilla/themes/bootflat/static/js/site.js'
2014-03-18 12:48:12 +00:00
clean:
development:
src: [
"shelfzilla/themes/bootflat/static/js/*.full.js",
2014-03-18 12:48:12 +00:00
]
production:
src: [
"shelfzilla/themes/bootflat/static/js/*.full.js",
2014-03-18 12:48:12 +00:00
]
release:
src: [
"shelfzilla/themes/bootflat/static/less",
"shelfzilla/themes/bootflat/static/coffee",
2014-03-18 12:48:12 +00:00
]
watch:
options:
livereload: true
layout:
files: ['shelfzilla/themes/bootflat/templates/**/*.html', 'shelfzilla/themes/bootflat/templates/**/*.jinja']
2014-03-18 12:48:12 +00:00
tasks: []
less:
files: ['shelfzilla/themes/bootflat/static/less/*.less']
2014-03-18 12:48:12 +00:00
tasks: ['less']
coffee:
files: ['shelfzilla/themes/bootflat/static/coffee/*.coffee']
2014-03-18 12:48:12 +00:00
tasks: ['coffee', 'concat', 'clean:development']
# Modules
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-clean'
# Tasks
grunt.registerTask 'default', [
"less", "coffee", "concat", "clean:development",
"watch"
]
grunt.registerTask 'compile', [
"less", "coffee", "concat", 'uglify', "clean:development"
]
grunt.registerTask 'build', [
"less", "coffee", "concat", "uglify", 'clean:production'
]