aboutsummaryrefslogtreecommitdiffhomepage
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
parent4634cfb353d47a381e19c72f6887fc68f6fbc4bf (diff)
downloadPeerTube-9d640786596f940caca7599dcbde8c89064246eb.tar.gz
PeerTube-9d640786596f940caca7599dcbde8c89064246eb.tar.zst
PeerTube-9d640786596f940caca7599dcbde8c89064246eb.zip
Clean grunt file
-rw-r--r--Gruntfile.js116
-rw-r--r--package.json11
2 files changed, 1 insertions, 126 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}
diff --git a/package.json b/package.json
index 8693e9b0b..8ef7d1b9b 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,6 @@
20 "compression": "^1.5.0", 20 "compression": "^1.5.0",
21 "config": "^1.14.0", 21 "config": "^1.14.0",
22 "connect-livereload": "^0.5.3", 22 "connect-livereload": "^0.5.3",
23 "cookie-parser": "^1.3.5",
24 "debug": "^2.2.0", 23 "debug": "^2.2.0",
25 "dezalgo": "^1.0.3", 24 "dezalgo": "^1.0.3",
26 "electron-spawn": "https://github.com/Chocobozzz/electron-spawn", 25 "electron-spawn": "https://github.com/Chocobozzz/electron-spawn",
@@ -29,20 +28,10 @@
29 "grunt": "^0.4.5", 28 "grunt": "^0.4.5",
30 "grunt-browserify": "^4.0.1", 29 "grunt-browserify": "^4.0.1",
31 "grunt-contrib-clean": "^0.6.0", 30 "grunt-contrib-clean": "^0.6.0",
32 "grunt-contrib-concat": "^0.5.1",
33 "grunt-contrib-copy": "0.8.0", 31 "grunt-contrib-copy": "0.8.0",
34 "grunt-contrib-csslint": "^0.4.0",
35 "grunt-contrib-cssmin": "^0.12.3",
36 "grunt-contrib-htmlmin": "^0.4.0",
37 "grunt-contrib-imagemin": "^0.9.4",
38 "grunt-contrib-jade": "^0.14.1",
39 "grunt-contrib-jshint": "^0.11.2",
40 "grunt-contrib-uglify": "^0.9.1",
41 "grunt-contrib-watch": "^0.6.1", 32 "grunt-contrib-watch": "^0.6.1",
42 "grunt-express-server": "^0.5.1", 33 "grunt-express-server": "^0.5.1",
43 "grunt-filerev": "^2.3.1",
44 "grunt-newer": "^1.1.1", 34 "grunt-newer": "^1.1.1",
45 "grunt-usemin": "^3.0.0",
46 "jade": "^1.10.0", 35 "jade": "^1.10.0",
47 "jquery": "^2.1.4", 36 "jquery": "^2.1.4",
48 "js-yaml": "^3.3.1", 37 "js-yaml": "^3.3.1",