aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-03-08 17:02:34 +0100
committerThomas Citharel <tcit@tcit.fr>2016-06-09 17:12:51 +0200
commit5ecdfcd041767c9e3244a92bb0a6cc3c3f80fea3 (patch)
tree03ee1eab0d89d1857daca9e273fd8c9ca47e33c2 /Gruntfile.js
parent9f95b14dec88cf083cefa38d5fbd84189e07acac (diff)
downloadwallabag-5ecdfcd041767c9e3244a92bb0a6cc3c3f80fea3.tar.gz
wallabag-5ecdfcd041767c9e3244a92bb0a6cc3c3f80fea3.tar.zst
wallabag-5ecdfcd041767c9e3244a92bb0a6cc3c3f80fea3.zip
manage assets through npm
first draft remote assetic totally work nearly there use at least nodejs > 0.12 use proper version of grunt bump nodejs version for travis update npm workaround for materialize install node 5.0 add grunt-cli baggy theme & cache node modules cache bower & npm make travis build assets on php7 only exclude installing node & npm if not needed & use bash clean & try to make icomoon work on baggy ready config for travis rebase make travis work more travis work impove travis & update deps add missing pixrem deps add module through oddly lost ui updates install latest nodejs add install_dev.sh, link local binaries for npm/bower/grunt ui improvements (mostly baggy) fix travis build no need to install on travis Add unread filter to entries pages Add the ability to filter for unread pages in the filters menu. Add unread filter test to EntryControllerTest Add a new test to the EntryControllerTest collection which checks that only entries which have not been archived (and are treated as "unread") are retrieved. Improve English translation Update FAQ -Fix grammar -Add notes about MTA, firewall, and SELinux Update installation instructions -Fix grammar -Add SELinux section add screenshots of android docu in English Fix the deletion of Tags/Entries relation when delete an entry Fix #2121 Move fixtures to the right place Display a message when saving an entry failed When saving an entry fail because of database error we previously just returned `false`. Now we got an error in the log and the displayed notice to the user is updated too. Change ManyToMany between entry & tag Following https://gist.github.com/Ocramius/3121916 Be sure to remove the related entity when removing an entity. Let say you have Entry -> EntryTag -> Tag. If you remove the entry: - before that commit, the EntryTag will stay (at least using SQLite). - with that commit, the related entity is removed Prepare wallabag 2.0.5 enforce older materialize version
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js219
1 files changed, 219 insertions, 0 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 00000000..c63c392b
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,219 @@
1module.exports = function (grunt) {
2 require('load-grunt-tasks')(grunt);
3
4 grunt.initConfig({
5 appDir: 'app/Resources/static',
6 buildDir: 'web/bundles/wallabagcore',
7
8 postcss: {
9 material: {
10 options: {
11 map: {
12 inline: false
13 },
14
15 processors: [
16 require('pixrem')(),
17 require('autoprefixer')({browsers: 'last 2 versions'}),
18 require('cssnano')()
19 ]
20 },
21 src: '<%= buildDir %>/material.css',
22 dest: '<%= buildDir %>/themes/material/css/style.min.css'
23 },
24 baggy: {
25 options: {
26 map: {
27 inline: false
28 },
29
30 processors: [
31 require('pixrem')(),
32 require('autoprefixer')({browsers: 'last 2 versions'}),
33 require('cssnano')()
34 ]
35 },
36 src: '<%= buildDir %>/baggy.css',
37 dest: '<%= buildDir %>/themes/baggy/css/style.min.css'
38 }
39 },
40 concat: {
41 options: {
42 separator: ';'
43 },
44 jsMaterial: {
45 src: [
46 'node_modules/jquery/dist/jquery.js',
47 'node_modules/jquery-ui/jquery-ui.js',
48 'node_modules/materialize-css/bin/materialize.js',
49 '<%= appDir %>/themes/_global/js/restoreScroll.js',
50 '<%= appDir %>/themes/material/js/init.js'
51 ],
52 dest: '<%= buildDir %>/material.js'
53 },
54 jsBaggy: {
55 src: [
56 'node_modules/jquery/dist/jquery.js',
57 'node_modules/jquery-ui/jquery-ui.js',
58 '<%= appDir %>/themes/baggy/js/init.js',
59 '<%= appDir %>/themes/_global/js/restoreScroll.js',
60 '<%= appDir %>/themes/baggy/js/autoClose.js',
61 '<%= appDir %>/themes/baggy/js/autoCompleteTags.js',
62 '<%= appDir %>/themes/baggy/js/closeMessage.js',
63 '<%= appDir %>/themes/baggy/js/popupForm.js',
64 '<%= appDir %>/themes/baggy/js/saveLink.js'
65 ],
66 dest: '<%= buildDir %>/baggy.js'
67 },
68 cssMaterial: {
69 src: [
70 'node_modules/materialize-css/bin/materialize.css',
71 '<%= appDir %>/themes/material/css/*.css'
72 ],
73 dest: '<%= buildDir %>/material.css'
74 },
75 cssBaggy: {
76 src: [
77 '<%= appDir %>/themes/baggy/css/*.css'
78 ],
79 dest: '<%= buildDir %>/baggy.css'
80 }
81 },
82 browserify: {
83 '<%= buildDir %>/material.browser.js': ['<%= buildDir %>/material.js'],
84 '<%= buildDir %>/baggy.browser.js': ['<%= buildDir %>/baggy.js']
85 },
86 uglify: {
87 material: {
88 files: {
89 '<%= buildDir %>/themes/material/js/material.min.js':
90 ['<%= buildDir %>/material.browser.js']
91 },
92 options: {
93 sourceMap: true,
94 },
95 },
96 baggy: {
97 files: {
98 '<%= buildDir %>/themes/baggy/js/baggy.min.js':
99 ['<%= buildDir %>/baggy.browser.js']
100 },
101 options: {
102 sourceMap: true,
103 },
104 },
105 },
106 copy: {
107 pickerjs: {
108 expand: true,
109 cwd: 'node_modules/pickadate/lib',
110 src: 'picker.js',
111 dest: '<%= buildDir %>'
112 },
113 annotator: {
114 expand: true,
115 cwd: 'node_modules/annotator/pkg',
116 src: 'annotator.min.js',
117 dest: '<%= buildDir %>/themes/_global/js/'
118 }
119 },
120 symlink: {
121 baggyfonts: {
122 files: [
123 {
124 expand: true,
125 overwrite: true,
126 cwd: "<%= appDir %>/lib/icomoon-bower/",
127 src: "fonts",
128 dest: "<%= buildDir %>/themes/baggy/"
129 },
130 {
131 expand: true,
132 overwrite: true,
133 cwd: "<%= appDir %>/lib/bower-pt-sans/fonts",
134 src: "*",
135 dest: "<%= buildDir %>/themes/baggy/fonts/"
136 }
137 ]
138 },
139 materialfonts: {
140 files: [
141 {
142 expand: true,
143 overwrite: true,
144 cwd: "<%= appDir %>/lib/icomoon-bower/",
145 src: "fonts",
146 dest: "<%= buildDir %>/themes/material/"
147 },
148 {
149 expand: true,
150 overwrite: true,
151 cwd: "node_modules/materialize-css/",
152 src: "font",
153 dest: "<%= buildDir %>/themes/material"
154 },
155 {
156 expand: true,
157 overwrite: true,
158 cwd: "<%= appDir %>/lib/roboto-fontface/fonts/",
159 src: "*",
160 dest: "<%= buildDir %>/themes/material/fonts/roboto/"
161 },
162 {
163 expand: true,
164 overwrite: true,
165 cwd: "<%= appDir %>/lib/material-design-icons/iconfont/",
166 src: "*",
167 dest: "<%= buildDir %>/themes/material/fonts/"
168 }
169 ]
170 },
171 pics: {
172 files: [
173 {
174 expand: true,
175 overwrite: true,
176 cwd: '<%= appDir %>/themes/_global/',
177 src: 'img',
178 dest: '<%= buildDir %>/themes/_global/'
179 }
180 ]
181 }
182 },
183 clean: {
184 css: {
185 src: [ '<%= buildDir %>/**/*.css' ]
186 },
187 js: {
188 src: ['<%= buildDir %>/**/*.js', '<%= buildDir %>/**/*.map']
189 },
190 all: {
191 src: ['./<%= buildDir %>']
192 }
193 }
194 });
195
196 grunt.registerTask(
197 'fonts',
198 'Install fonts',
199 ['symlink:baggyfonts', 'symlink:materialfonts']
200 );
201
202 grunt.registerTask(
203 'js',
204 'Build and install js files',
205 ['clean:js', 'copy:pickerjs', 'concat:jsMaterial', 'concat:jsBaggy', 'browserify', 'uglify']
206 );
207
208 grunt.registerTask(
209 'default',
210 'Build and install everything',
211 ['clean', 'copy:pickerjs', 'concat', 'browserify', 'uglify', 'postcss', 'symlink']
212 );
213
214 grunt.registerTask(
215 'css',
216 'Compiles the stylesheets.',
217 ['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss']
218 );
219}