-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
80 lines (64 loc) · 3.77 KB
/
Gruntfile.js
File metadata and controls
80 lines (64 loc) · 3.77 KB
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
module.exports = function(grunt) {
// Configuration goes here
grunt.initConfig({
// read package file for settings/dependencies
pkg: grunt.file.readJSON('package.json'),
// handlebars template precompile
handlebars: {
compile: {
options: {
namespace: 'Handlebars.templates',
processName: function (filePath) {
var pieces = filePath.split('/');
return pieces[pieces.length - 1];
},
amd: true
},
files: {
// navigation bar
"client/web/static/templates/navigation-bar-layout.js": "client/web/js/templates/navigation-bar-layout.hbs",
// side bar
"client/web/static/templates/side-bar-layout.js": "client/web/js/templates/side-bar-layout.hbs",
// landing page
"client/web/static/templates/landing-page-layout.js": "client/web/js/templates/landing-page-layout.hbs",
// login
"client/web/static/templates/login-layout.js": "client/web/js/templates/login-layout.hbs",
// sign-up
"client/web/static/templates/new-user-layout.js": "client/web/js/templates/new-user-layout.hbs",
// user
"client/web/static/templates/user-layout.js": "client/web/js/templates/user-layout.hbs",
// search
"client/web/static/templates/search-layout.js": "client/web/js/templates/search-layout.hbs",
"client/web/static/templates/search-results-composite-view.js": "client/web/js/templates/search-results-composite-view.hbs",
// user tweets
"client/web/static/templates/user-tweets-layout.js": "client/web/js/templates/user-tweets-layout.hbs",
// user followers
"client/web/static/templates/user-followers-layout.js": "client/web/js/templates/user-followers-layout.hbs",
// user following
"client/web/static/templates/user-following-layout.js": "client/web/js/templates/user-following-layout.hbs",
// user tweets composite view
"client/web/static/templates/user-tweets-composite-view.js": "client/web/js/templates/user-tweets-composite-view.hbs",
// user followers composite view
"client/web/static/templates/user-followers-composite-view.js": "client/web/js/templates/user-followers-composite-view.hbs",
// user following composite view
"client/web/static/templates/user-following-composite-view.js": "client/web/js/templates/user-following-composite-view.hbs",
// tweet item view
"client/web/static/templates/tweet-item-view.js": "client/web/js/templates/tweet-item-view.hbs",
// user item view
"client/web/static/templates/user-item-view.js": "client/web/js/templates/user-item-view.hbs"
}
}
}
});
// plugins
grunt.loadNpmTasks('grunt-contrib-handlebars');
// tasks
grunt.registerTask('default', function () {
grunt.log.write("Default task...").ok();
});
grunt.registerTask('custom', function() {
grunt.log.write('Custom task running...').ok();
});
// handlebars compile
grunt.registerTask('hbs', [ 'handlebars' ]);
};