aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gruntfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js124
1 files changed, 60 insertions, 64 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index c63c392b..04fd1fe8 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -9,85 +9,81 @@ module.exports = function (grunt) {
9 material: { 9 material: {
10 options: { 10 options: {
11 map: { 11 map: {
12 inline: false 12 inline: false,
13 }, 13 },
14 14
15 processors: [ 15 processors: [
16 require('pixrem')(), 16 require('pixrem')(),
17 require('autoprefixer')({browsers: 'last 2 versions'}), 17 require('autoprefixer')({ browsers: 'last 2 versions' }),
18 require('cssnano')() 18 require('cssnano')(),
19 ] 19 ],
20 }, 20 },
21 src: '<%= buildDir %>/material.css', 21 src: '<%= buildDir %>/material.css',
22 dest: '<%= buildDir %>/themes/material/css/style.min.css' 22 dest: '<%= buildDir %>/themes/material/css/style.min.css',
23 }, 23 },
24 baggy: { 24 baggy: {
25 options: { 25 options: {
26 map: { 26 map: {
27 inline: false 27 inline: false,
28 }, 28 },
29 29
30 processors: [ 30 processors: [
31 require('pixrem')(), 31 require('pixrem')(),
32 require('autoprefixer')({browsers: 'last 2 versions'}), 32 require('autoprefixer')({ browsers: 'last 2 versions' }),
33 require('cssnano')() 33 require('cssnano')(),
34 ] 34 ],
35 }, 35 },
36 src: '<%= buildDir %>/baggy.css', 36 src: '<%= buildDir %>/baggy.css',
37 dest: '<%= buildDir %>/themes/baggy/css/style.min.css' 37 dest: '<%= buildDir %>/themes/baggy/css/style.min.css',
38 } 38 },
39 }, 39 },
40 concat: { 40 concat: {
41 options: { 41 options: {
42 separator: ';' 42 separator: ';',
43 }, 43 },
44 jsMaterial: { 44 jsMaterial: {
45 src: [ 45 src: [
46 'node_modules/jquery/dist/jquery.js', 46 '<%= appDir %>/themes/material/js/init.js',
47 'node_modules/jquery-ui/jquery-ui.js',
48 'node_modules/materialize-css/bin/materialize.js',
49 '<%= appDir %>/themes/_global/js/restoreScroll.js', 47 '<%= appDir %>/themes/_global/js/restoreScroll.js',
50 '<%= appDir %>/themes/material/js/init.js'
51 ], 48 ],
52 dest: '<%= buildDir %>/material.js' 49 dest: '<%= buildDir %>/material.js',
53 }, 50 },
54 jsBaggy: { 51 jsBaggy: {
55 src: [ 52 src: [
56 'node_modules/jquery/dist/jquery.js',
57 'node_modules/jquery-ui/jquery-ui.js',
58 '<%= appDir %>/themes/baggy/js/init.js', 53 '<%= appDir %>/themes/baggy/js/init.js',
59 '<%= appDir %>/themes/_global/js/restoreScroll.js', 54 '<%= appDir %>/themes/_global/js/restoreScroll.js',
60 '<%= appDir %>/themes/baggy/js/autoClose.js', 55 '<%= appDir %>/themes/baggy/js/autoClose.js',
61 '<%= appDir %>/themes/baggy/js/autoCompleteTags.js', 56 '<%= appDir %>/themes/baggy/js/autoCompleteTags.js',
62 '<%= appDir %>/themes/baggy/js/closeMessage.js', 57 '<%= appDir %>/themes/baggy/js/closeMessage.js',
63 '<%= appDir %>/themes/baggy/js/popupForm.js', 58 '<%= appDir %>/themes/baggy/js/popupForm.js',
64 '<%= appDir %>/themes/baggy/js/saveLink.js' 59 // Save link is no more used for now
60 // '<%= appDir %>/themes/baggy/js/saveLink.js',
65 ], 61 ],
66 dest: '<%= buildDir %>/baggy.js' 62 dest: '<%= buildDir %>/baggy.js',
67 }, 63 },
68 cssMaterial: { 64 cssMaterial: {
69 src: [ 65 src: [
70 'node_modules/materialize-css/bin/materialize.css', 66 'node_modules/materialize-css/bin/materialize.css',
71 '<%= appDir %>/themes/material/css/*.css' 67 '<%= appDir %>/themes/material/css/*.css',
72 ], 68 ],
73 dest: '<%= buildDir %>/material.css' 69 dest: '<%= buildDir %>/material.css',
74 }, 70 },
75 cssBaggy: { 71 cssBaggy: {
76 src: [ 72 src: [
77 '<%= appDir %>/themes/baggy/css/*.css' 73 '<%= appDir %>/themes/baggy/css/*.css',
78 ], 74 ],
79 dest: '<%= buildDir %>/baggy.css' 75 dest: '<%= buildDir %>/baggy.css',
80 } 76 },
81 }, 77 },
82 browserify: { 78 browserify: {
83 '<%= buildDir %>/material.browser.js': ['<%= buildDir %>/material.js'], 79 '<%= buildDir %>/material.browser.js': ['<%= buildDir %>/material.js'],
84 '<%= buildDir %>/baggy.browser.js': ['<%= buildDir %>/baggy.js'] 80 '<%= buildDir %>/baggy.browser.js': ['<%= buildDir %>/baggy.js'],
85 }, 81 },
86 uglify: { 82 uglify: {
87 material: { 83 material: {
88 files: { 84 files: {
89 '<%= buildDir %>/themes/material/js/material.min.js': 85 '<%= buildDir %>/themes/material/js/material.min.js':
90 ['<%= buildDir %>/material.browser.js'] 86 ['<%= buildDir %>/material.browser.js'],
91 }, 87 },
92 options: { 88 options: {
93 sourceMap: true, 89 sourceMap: true,
@@ -96,7 +92,7 @@ module.exports = function (grunt) {
96 baggy: { 92 baggy: {
97 files: { 93 files: {
98 '<%= buildDir %>/themes/baggy/js/baggy.min.js': 94 '<%= buildDir %>/themes/baggy/js/baggy.min.js':
99 ['<%= buildDir %>/baggy.browser.js'] 95 ['<%= buildDir %>/baggy.browser.js'],
100 }, 96 },
101 options: { 97 options: {
102 sourceMap: true, 98 sourceMap: true,
@@ -108,14 +104,14 @@ module.exports = function (grunt) {
108 expand: true, 104 expand: true,
109 cwd: 'node_modules/pickadate/lib', 105 cwd: 'node_modules/pickadate/lib',
110 src: 'picker.js', 106 src: 'picker.js',
111 dest: '<%= buildDir %>' 107 dest: '<%= buildDir %>',
112 }, 108 },
113 annotator: { 109 annotator: {
114 expand: true, 110 expand: true,
115 cwd: 'node_modules/annotator/pkg', 111 cwd: 'node_modules/annotator/pkg',
116 src: 'annotator.min.js', 112 src: 'annotator.min.js',
117 dest: '<%= buildDir %>/themes/_global/js/' 113 dest: '<%= buildDir %>/themes/_global/js/',
118 } 114 },
119 }, 115 },
120 symlink: { 116 symlink: {
121 baggyfonts: { 117 baggyfonts: {
@@ -123,50 +119,50 @@ module.exports = function (grunt) {
123 { 119 {
124 expand: true, 120 expand: true,
125 overwrite: true, 121 overwrite: true,
126 cwd: "<%= appDir %>/lib/icomoon-bower/", 122 cwd: '<%= appDir %>/lib/icomoon-bower/',
127 src: "fonts", 123 src: 'fonts',
128 dest: "<%= buildDir %>/themes/baggy/" 124 dest: '<%= buildDir %>/themes/baggy/',
129 }, 125 },
130 { 126 {
131 expand: true, 127 expand: true,
132 overwrite: true, 128 overwrite: true,
133 cwd: "<%= appDir %>/lib/bower-pt-sans/fonts", 129 cwd: '<%= appDir %>/lib/bower-pt-sans/fonts',
134 src: "*", 130 src: '*',
135 dest: "<%= buildDir %>/themes/baggy/fonts/" 131 dest: '<%= buildDir %>/themes/baggy/fonts/',
136 } 132 },
137 ] 133 ],
138 }, 134 },
139 materialfonts: { 135 materialfonts: {
140 files: [ 136 files: [
141 { 137 {
142 expand: true, 138 expand: true,
143 overwrite: true, 139 overwrite: true,
144 cwd: "<%= appDir %>/lib/icomoon-bower/", 140 cwd: '<%= appDir %>/lib/icomoon-bower/',
145 src: "fonts", 141 src: 'fonts',
146 dest: "<%= buildDir %>/themes/material/" 142 dest: '<%= buildDir %>/themes/material/',
147 }, 143 },
148 { 144 {
149 expand: true, 145 expand: true,
150 overwrite: true, 146 overwrite: true,
151 cwd: "node_modules/materialize-css/", 147 cwd: 'node_modules/materialize-css/',
152 src: "font", 148 src: 'font',
153 dest: "<%= buildDir %>/themes/material" 149 dest: '<%= buildDir %>/themes/material',
154 }, 150 },
155 { 151 {
156 expand: true, 152 expand: true,
157 overwrite: true, 153 overwrite: true,
158 cwd: "<%= appDir %>/lib/roboto-fontface/fonts/", 154 cwd: '<%= appDir %>/lib/roboto-fontface/fonts/',
159 src: "*", 155 src: '*',
160 dest: "<%= buildDir %>/themes/material/fonts/roboto/" 156 dest: '<%= buildDir %>/themes/material/fonts/roboto/',
161 }, 157 },
162 { 158 {
163 expand: true, 159 expand: true,
164 overwrite: true, 160 overwrite: true,
165 cwd: "<%= appDir %>/lib/material-design-icons/iconfont/", 161 cwd: '<%= appDir %>/lib/material-design-icons/iconfont/',
166 src: "*", 162 src: '*',
167 dest: "<%= buildDir %>/themes/material/fonts/" 163 dest: '<%= buildDir %>/themes/material/fonts/',
168 } 164 },
169 ] 165 ],
170 }, 166 },
171 pics: { 167 pics: {
172 files: [ 168 files: [
@@ -175,22 +171,22 @@ module.exports = function (grunt) {
175 overwrite: true, 171 overwrite: true,
176 cwd: '<%= appDir %>/themes/_global/', 172 cwd: '<%= appDir %>/themes/_global/',
177 src: 'img', 173 src: 'img',
178 dest: '<%= buildDir %>/themes/_global/' 174 dest: '<%= buildDir %>/themes/_global/',
179 } 175 },
180 ] 176 ],
181 } 177 },
182 }, 178 },
183 clean: { 179 clean: {
184 css: { 180 css: {
185 src: [ '<%= buildDir %>/**/*.css' ] 181 src: ['<%= buildDir %>/**/*.css'],
186 }, 182 },
187 js: { 183 js: {
188 src: ['<%= buildDir %>/**/*.js', '<%= buildDir %>/**/*.map'] 184 src: ['<%= buildDir %>/**/*.js', '<%= buildDir %>/**/*.map'],
189 }, 185 },
190 all: { 186 all: {
191 src: ['./<%= buildDir %>'] 187 src: ['./<%= buildDir %>'],
192 } 188 },
193 } 189 },
194 }); 190 });
195 191
196 grunt.registerTask( 192 grunt.registerTask(
@@ -216,4 +212,4 @@ module.exports = function (grunt) {
216 'Compiles the stylesheets.', 212 'Compiles the stylesheets.',
217 ['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss'] 213 ['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss']
218 ); 214 );
219} 215};