-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
93 lines (80 loc) · 2.71 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
module.exports = (grunt) ->
'use strict'
# Load plugins.
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-install-dependencies'
grunt.loadNpmTasks 'grunt-bower-cli',
grunt.loadNpmTasks 'grunt-contrib-jshint'
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
uglify:
dev:
options:
mangle: false
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
files:
'dist/<%= pkg.name %>.min.js': [ 'dist/<%= pkg.name %>.js' ]
#coffee:
#compile:
#files:
#'dist/<%= pkg.name %>.js': ['src/*.coffee']
connect:
server:
options:
port: 8000
hostname: "localhost"
open: 'http://localhost:8000/index.html'
watch:
scripts:
files: ['**/*.js']
tasks: ['jshint']
options:
spawn: false
#scripts:
#files: ['src/*.coffee', 'less/*.less']
#tasks: ['coffee']
#options:
#livereload: true
#styles:
#files: ['less/*.less']
#tasks: ['less']
#options:
#nospawn: true
#less:
#dev:
#files:
#'css/main.css': 'less/main.less'
concat:
bower_js:
options:
separator: "\n\n/*newfile*/\n\n"
src: ['bower_components/jquery/dist/jquery.min.js',
'bower_components/bootstrap/dist/js/bootstrap.min.js',
'bower_components/bootstrap/js/tab.js',
'bower_components/d3/d3.min.js',
'bower_components/bootstrap-list-filter/bootstrap-list-filter.min.js',
'bower_components/spectrum/spectrum.js']
dest: 'dist/bower.js'
copy:
src:
files: [{expand: true, flatten: true, cwd: 'src/', src: ['**'], dest: 'dist/'}]
dependencies:
files: [{
cwd: 'bower_components/tmxsl', # set working folder / root to copy
src: '**/*', # copy all files and subfolders
dest: 'data/xslt/tmxsl', # destination folder
expand: true # required when using cwd
}]
#fonts:
# files: [{expand: true, cwd: 'bower_components/bootstrap/dist/fonts/', src: ['*'], dest: 'fonts/'}]
# Task(s).
grunt.registerTask 'default', ['copy','concat', 'uglify']
grunt.registerTask 'run', ['connect', 'watch']
grunt.registerTask 'build', ['install-dependencies']