diff options
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index 5aaa13dff..15e75247e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js | |||
@@ -2,13 +2,11 @@ | |||
2 | 2 | ||
3 | module.exports = function (grunt) { | 3 | module.exports = function (grunt) { |
4 | var paths = { | 4 | var paths = { |
5 | css: 'public/stylesheets/*.css', | 5 | css: 'client/stylesheets/*.css', |
6 | scss: 'public/stylesheets/application.scss', | 6 | scss: 'client/stylesheets/application.scss', |
7 | vendor: 'public/stylesheets/vendor', | 7 | vendor: 'client/stylesheets/vendor', |
8 | js: 'public/javascripts/*.js', | ||
9 | routes: './server/controllers/**/*.js', | 8 | routes: './server/controllers/**/*.js', |
10 | main: './server.js', | 9 | main: './server.js', |
11 | browserified: 'public/javascripts/bundle.js', | ||
12 | img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}', | 10 | img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}', |
13 | test: 'tests', | 11 | test: 'tests', |
14 | server: 'server.js' | 12 | server: 'server.js' |
@@ -20,16 +18,6 @@ module.exports = function (grunt) { | |||
20 | grunt.initConfig({ | 18 | grunt.initConfig({ |
21 | paths: paths, | 19 | paths: paths, |
22 | pkg: grunt.file.readJSON('package.json'), | 20 | pkg: grunt.file.readJSON('package.json'), |
23 | browserify: { | ||
24 | dev: { | ||
25 | src: [ paths.js, '!public/javascripts/bundle.js' ], | ||
26 | dest: paths.browserified, | ||
27 | options: { | ||
28 | browserifyOptions: { 'debug': true }, | ||
29 | watch: true | ||
30 | } | ||
31 | } | ||
32 | }, | ||
33 | concurrent: { | 21 | concurrent: { |
34 | options: { | 22 | options: { |
35 | logConcurrentOutput: true | 23 | logConcurrentOutput: true |
@@ -72,22 +60,9 @@ module.exports = function (grunt) { | |||
72 | }, | 60 | }, |
73 | dev: { | 61 | dev: { |
74 | files: { | 62 | files: { |
75 | 'public/stylesheets/global.css': paths.scss | 63 | 'client/stylesheets/global.css': paths.scss |
76 | } | 64 | } |
77 | } | 65 | } |
78 | }, | ||
79 | watch: { | ||
80 | livereload: { | ||
81 | files: [ paths.jade, paths.css, paths.browserified ], | ||
82 | tasks: [ ], | ||
83 | options: { | ||
84 | livereload: true | ||
85 | } | ||
86 | }, | ||
87 | sass: { | ||
88 | files: [ paths.scss ], | ||
89 | tasks: [ 'sass:dev' ] | ||
90 | } | ||
91 | } | 66 | } |
92 | }) | 67 | }) |
93 | 68 | ||
@@ -95,10 +70,7 @@ module.exports = function (grunt) { | |||
95 | require('load-grunt-tasks')(grunt) | 70 | require('load-grunt-tasks')(grunt) |
96 | 71 | ||
97 | // Build client javascript and copy bootstrap dependencies | 72 | // Build client javascript and copy bootstrap dependencies |
98 | grunt.registerTask('build', [ 'sass:dev', 'newer:browserify:dev', 'newer:copy:dev' ]) | 73 | grunt.registerTask('build', [ 'sass:dev', 'newer:copy:dev' ]) |
99 | |||
100 | // Start in dev mode (reload front end files without refresh) | ||
101 | grunt.registerTask('dev', [ 'sass:dev', 'newer:browserify:dev', 'newer:copy:dev', 'concurrent:dev' ]) | ||
102 | 74 | ||
103 | // Clean build | 75 | // Clean build |
104 | grunt.registerTask('clean', [], function () { | 76 | grunt.registerTask('clean', [], function () { |