aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gruntfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js41
1 files changed, 19 insertions, 22 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 86612dc4..bd0d6dda 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -3,8 +3,9 @@ module.exports = function (grunt) {
3 3
4 grunt.initConfig({ 4 grunt.initConfig({
5 appDir: 'app/Resources/static', 5 appDir: 'app/Resources/static',
6 buildDir: 'web/bundles/wallabagcore', 6 buildDir: 'app/Resources/build',
7 modulesDir: 'node_modules', 7 modulesDir: 'node_modules',
8 releaseDir: 'web/bundles/wallabagcore',
8 9
9 postcss: { 10 postcss: {
10 material: { 11 material: {
@@ -20,7 +21,7 @@ module.exports = function (grunt) {
20 ], 21 ],
21 }, 22 },
22 src: '<%= buildDir %>/material.css', 23 src: '<%= buildDir %>/material.css',
23 dest: '<%= buildDir %>/themes/material/css/style.min.css', 24 dest: '<%= releaseDir %>/themes/material/css/style.min.css',
24 }, 25 },
25 baggy: { 26 baggy: {
26 options: { 27 options: {
@@ -35,7 +36,7 @@ module.exports = function (grunt) {
35 ], 36 ],
36 }, 37 },
37 src: '<%= buildDir %>/baggy.css', 38 src: '<%= buildDir %>/baggy.css',
38 dest: '<%= buildDir %>/themes/baggy/css/style.min.css', 39 dest: '<%= releaseDir %>/themes/baggy/css/style.min.css',
39 }, 40 },
40 }, 41 },
41 concat: { 42 concat: {
@@ -92,7 +93,7 @@ module.exports = function (grunt) {
92 uglify: { 93 uglify: {
93 material: { 94 material: {
94 files: { 95 files: {
95 '<%= buildDir %>/themes/material/js/material.min.js': 96 '<%= releaseDir %>/themes/material/js/material.min.js':
96 ['<%= buildDir %>/material.browser.js'], 97 ['<%= buildDir %>/material.browser.js'],
97 }, 98 },
98 options: { 99 options: {
@@ -101,7 +102,7 @@ module.exports = function (grunt) {
101 }, 102 },
102 baggy: { 103 baggy: {
103 files: { 104 files: {
104 '<%= buildDir %>/themes/baggy/js/baggy.min.js': 105 '<%= releaseDir %>/themes/baggy/js/baggy.min.js':
105 ['<%= buildDir %>/baggy.browser.js'], 106 ['<%= buildDir %>/baggy.browser.js'],
106 }, 107 },
107 options: { 108 options: {
@@ -131,21 +132,21 @@ module.exports = function (grunt) {
131 overwrite: true, 132 overwrite: true,
132 cwd: '<%= modulesDir %>/icomoon-free-npm/Font', 133 cwd: '<%= modulesDir %>/icomoon-free-npm/Font',
133 src: 'IcoMoon-Free.ttf', 134 src: 'IcoMoon-Free.ttf',
134 dest: '<%= buildDir %>/themes/baggy/fonts/', 135 dest: '<%= releaseDir %>/themes/baggy/fonts/',
135 }, 136 },
136 { 137 {
137 expand: true, 138 expand: true,
138 overwrite: true, 139 overwrite: true,
139 cwd: '<%= modulesDir %>/ptsans-npm-webfont/fonts', 140 cwd: '<%= modulesDir %>/ptsans-npm-webfont/fonts',
140 src: '*', 141 src: 'ptsansbold.woff',
141 dest: '<%= buildDir %>/themes/baggy/fonts/', 142 dest: '<%= releaseDir %>/themes/baggy/fonts/',
142 }, 143 },
143 { 144 {
144 expand: true, 145 expand: true,
145 overwrite: true, 146 overwrite: true,
146 cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/', 147 cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/',
147 src: '*', 148 src: ['MaterialIcons-Regular.eot', 'MaterialIcons-Regular.woff2', 'MaterialIcons-Regular.woff', 'MaterialIcons-Regular.ttf'],
148 dest: '<%= buildDir %>/themes/baggy/fonts/', 149 dest: '<%= releaseDir %>/themes/baggy/fonts/',
149 }, 150 },
150 ], 151 ],
151 }, 152 },
@@ -156,28 +157,21 @@ module.exports = function (grunt) {
156 overwrite: true, 157 overwrite: true,
157 cwd: '<%= modulesDir %>/icomoon-free-npm/Font', 158 cwd: '<%= modulesDir %>/icomoon-free-npm/Font',
158 src: 'IcoMoon-Free.ttf', 159 src: 'IcoMoon-Free.ttf',
159 dest: '<%= buildDir %>/themes/material/fonts', 160 dest: '<%= releaseDir %>/themes/material/fonts',
160 },
161 {
162 expand: true,
163 overwrite: true,
164 cwd: '<%= modulesDir %>/materialize-css/',
165 src: 'font',
166 dest: '<%= buildDir %>/themes/material',
167 }, 161 },
168 { 162 {
169 expand: true, 163 expand: true,
170 overwrite: true, 164 overwrite: true,
171 cwd: '<%= modulesDir %>/roboto-fontface/fonts/Roboto', 165 cwd: '<%= modulesDir %>/roboto-fontface/fonts/Roboto',
172 src: '*', 166 src: '*',
173 dest: '<%= buildDir %>/themes/material/fonts/', 167 dest: '<%= releaseDir %>/themes/material/font/roboto',
174 }, 168 },
175 { 169 {
176 expand: true, 170 expand: true,
177 overwrite: true, 171 overwrite: true,
178 cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/', 172 cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/',
179 src: '*', 173 src: ['MaterialIcons-Regular.eot', 'MaterialIcons-Regular.woff2', 'MaterialIcons-Regular.woff', 'MaterialIcons-Regular.ttf'],
180 dest: '<%= buildDir %>/themes/material/fonts/', 174 dest: '<%= releaseDir %>/themes/material/fonts/',
181 }, 175 },
182 ], 176 ],
183 }, 177 },
@@ -188,7 +182,7 @@ module.exports = function (grunt) {
188 overwrite: true, 182 overwrite: true,
189 cwd: '<%= appDir %>/themes/_global/', 183 cwd: '<%= appDir %>/themes/_global/',
190 src: 'img', 184 src: 'img',
191 dest: '<%= buildDir %>/themes/_global/', 185 dest: '<%= releaseDir %>/themes/_global/',
192 }, 186 },
193 ], 187 ],
194 }, 188 },
@@ -203,6 +197,9 @@ module.exports = function (grunt) {
203 all: { 197 all: {
204 src: ['./<%= buildDir %>'], 198 src: ['./<%= buildDir %>'],
205 }, 199 },
200 release: {
201 src: ['./<%= releaseDir %>/*'],
202 }
206 }, 203 },
207 }); 204 });
208 205