-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
67 lines (62 loc) · 1.82 KB
/
Gruntfile.js
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
var path = require("path");
var fs = require("fs");
var hb = require("handlebars");
var underscore = require("underscore");
module.exports = function (grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: {
main: {
options: {
install: false,
layout: "byComponent",
cleanTargetDir: true,
targetDir: "static/lib"
}
}
},
handlebars: {
dev: {
files: {
"static/templates.js": ["templates/**/*.hbs"]
},
options: {
namespace: 'cs279hw2.templates',
processName: function(filePath) {
var pieces = filePath.split("/");
return pieces[pieces.length - 1].replace('.hbs', '');
}
}
}
},
/*
requirejs: {
compile: {
options: {
name: 'main',
baseUrl: 'app/js/',
mainConfigFile: 'app/js/main.js',
out: 'prod/js/main.js'
}
}
},
*/
jshint: {
options: {
jshintrc: '.jshintrc',
ignores: ['static/lib/**/*.js']
},
grunt: ['./Gruntfile.js'],
src: ['static/js/**/*.js']
},
connect: {
options: {
port: 8000,
base: 'static/'
}
}
});
grunt.registerTask('build', ['bower:main', 'handlebars']);
grunt.registerTask('default', ['build']);
};