-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
73 lines (59 loc) · 1.91 KB
/
Gruntfile.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
'use strict';
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
requirejs:
compile:
options:
baseUrl: 'src/js'
mainConfigFile: 'src/js/main.js'
paths:
jquery: '../../lib/jquery.min',
'smart.ui': '../../lib/smart.ui.min',
underscore: '../../lib/underscore.min',
backbone: '../../lib/backbone.min',
bootstrap: '../../lib/bootstrap.min'
include: ['require','jquery', 'smart.ui', 'underscore', 'backbone', 'bootstrap','main']
out: 'dist/js/<%= pkg.name %>.js'
concat:
options:
banner: '/*! APP.common.css@<%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */'
js:
src: ['src/js/*.js']
dest: 'dist/js/<%= pkg.name %>.js'
jshint:
grunt:
src: [ 'Gruntfile.js' ]
options:
jshintrc: '.jshintrc'
dist:
src: 'dist/js/<%= pkg.name %>.js'
options:
jshintrc: 'src/.jshintrc'
sass:
dist:
files:
'public/css/<%= pkg.name %>.css': 'public/sass/main.scss'
options:
sourcemap: 'true'
uglify:
options:
banner: "/*! <%= pkg.name %> <%= pkg.version %> */\n"
release:
files:
'dist/js/<%= pkg.name %>.min.js': 'dist/js/<%= pkg.name %>.js'
cssmin:
combine:
files:
'public/css/<%= pkg.name %>.min.css': 'public/css/<%= pkg.name %>.css'
qunit:
all: ['test/index.html']
watch:
script:
files: ['public/sass/**/*.scss', 'Gruntfile.coffee']
tasks: ['sass', 'cssmin']
grunt.loadNpmTasks 'grunt-contrib-sass'
grunt.loadNpmTasks 'grunt-contrib-cssmin'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask 'default', ['sass','cssmin','watch']