aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-11-02 22:59:13 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-11-03 08:10:30 +0100
commit9d640786596f940caca7599dcbde8c89064246eb (patch)
treef32ed13cbe1b6d59d56e9ca77a60f25268c953f8 /Gruntfile.js
parent4634cfb353d47a381e19c72f6887fc68f6fbc4bf (diff)
downloadPeerTube-9d640786596f940caca7599dcbde8c89064246eb.tar.gz
PeerTube-9d640786596f940caca7599dcbde8c89064246eb.tar.zst
PeerTube-9d640786596f940caca7599dcbde8c89064246eb.zip
Clean grunt file
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js116
1 files changed, 1 insertions, 115 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index d83e60b3d..fa0c2026c 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -3,7 +3,6 @@
3module.exports = function (grunt) { 3module.exports = function (grunt) {
4 var paths = { 4 var paths = {
5 dist: 'dist', 5 dist: 'dist',
6 tmp: '.tmp',
7 jade: 'views/**/**/*.jade', 6 jade: 'views/**/**/*.jade',
8 css: 'public/stylesheets/*.css', 7 css: 'public/stylesheets/*.css',
9 vendor: 'public/stylesheets/vendor', 8 vendor: 'public/stylesheets/vendor',
@@ -31,10 +30,6 @@ module.exports = function (grunt) {
31 browserifyOptions: { 'debug': true }, 30 browserifyOptions: { 'debug': true },
32 watch: true 31 watch: true
33 } 32 }
34 },
35 dist: {
36 src: [ paths.js ],
37 dest: paths.browserified
38 } 33 }
39 }, 34 },
40 copy: { 35 copy: {
@@ -53,25 +48,8 @@ module.exports = function (grunt) {
53 paths.browserified 48 paths.browserified
54 ] 49 ]
55 }] 50 }]
56 },
57 dist: {
58 files: [{
59 dot: true,
60 src: [
61 paths.tmp,
62 paths.browserified,
63 '<%= paths.dist %>/*',
64 '!<%= paths.dist %>/.git*'
65 ]
66 }]
67 } 51 }
68 }, 52 },
69 csslint: {
70 options: {
71 csslintrc: '.csslintrc'
72 },
73 src: paths.css
74 },
75 express: { 53 express: {
76 dev: { 54 dev: {
77 options: { 55 options: {
@@ -82,95 +60,6 @@ module.exports = function (grunt) {
82 debug: true, 60 debug: true,
83 background: true 61 background: true
84 } 62 }
85 },
86 test: {
87 options: {
88 script: paths.server,
89 harmony: true,
90 port: 9000,
91 node_env: 'test',
92 background: true,
93 debug: false
94 }
95 },
96 prod: {
97 options: {
98 script: paths.server,
99 harmony: true,
100 port: 9000,
101 node_env: 'production',
102 background: false,
103 debug: false
104 }
105 }
106 },
107 filerev: {
108 options: {
109 copy: false
110 },
111 dist: {
112 cwd: 'dist',
113 src: [ paths.js, paths.css, paths.img ],
114 dest: 'dist',
115 expand: true
116 }
117 },
118 htmlmin: {
119 dist: {
120 options: {
121 removeComments: true,
122 collapseWhitespace: true
123 },
124 files: [ {
125 expand: true,
126 src: [ '<%= paths.dist %>/views/**/**/*.html' ]
127 } ]
128 }
129 },
130 imagemin: {
131 dist: {
132 files: [{
133 expand: true,
134 cwd: './public/images',
135 src: '*.{png,jpg,jpeg}',
136 dest: '<%= paths.dist %>/public/images'
137 }]
138 }
139 },
140 jade: {
141 dist: {
142 options: {
143 pretty: true
144 },
145 files: [ {
146 src: '**/*.jade',
147 dest: '<%= paths.dist %>/views',
148 ext: '.html',
149 cwd: './views',
150 expand: true
151 } ]
152 }
153 },
154 jshint: {
155 all: {
156 src: paths.js,
157 options: {
158 jshintrc: true
159 }
160 }
161 },
162 usemin: {
163 html: [ '<%= paths.dist %>/views/**/**/*.html' ],
164 css: [ '<%= paths.dist %>/public/stylesheets/*.css' ],
165 options: {
166 assetsDirs: [ '<%= paths.dist %>/public' ]
167 }
168 },
169 useminPrepare: {
170 html: '<%= paths.dist %>/views/index.html',
171 options: {
172 root: 'public',
173 dest: '<%= paths.dist %>/public'
174 } 63 }
175 }, 64 },
176 watch: { 65 watch: {
@@ -220,15 +109,12 @@ module.exports = function (grunt) {
220 ) 109 )
221 }) 110 })
222 111
223 // TODO
224 // Build dist directory for production
225
226 // Clean build 112 // Clean build
227 grunt.registerTask('clean', [], function () { 113 grunt.registerTask('clean', [], function () {
228 grunt.loadNpmTasks('grunt-contrib-clean') 114 grunt.loadNpmTasks('grunt-contrib-clean')
229 115
230 grunt.task.run( 116 grunt.task.run(
231 'clean:dist' 117 'clean:dev'
232 ) 118 )
233 }) 119 })
234} 120}