diff options
author | Bennett <hello@vantezzen.io> | 2020-10-11 20:16:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-11 19:16:18 +0100 |
commit | 3eb55287d9df74dae7e8196487e7038fec04d4ce (patch) | |
tree | b58ec428c018102b49ee719532a3c27e140d2a78 /gulpfile.babel.js | |
parent | Improve Ferdi's design (#977) (diff) | |
download | ferdium-app-3eb55287d9df74dae7e8196487e7038fec04d4ce.tar.gz ferdium-app-3eb55287d9df74dae7e8196487e7038fec04d4ce.tar.zst ferdium-app-3eb55287d9df74dae7e8196487e7038fec04d4ce.zip |
Add vertical style and "Always show workspace drawer" setting (#567)
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r-- | gulpfile.babel.js | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js index bf3b85083..d3d6a931d 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js | |||
@@ -58,6 +58,10 @@ const paths = { | |||
58 | dest: 'build/styles', | 58 | dest: 'build/styles', |
59 | watch: 'src/styles/**/*.scss', | 59 | watch: 'src/styles/**/*.scss', |
60 | }, | 60 | }, |
61 | verticalStyle: { | ||
62 | src: 'src/styles/vertical.scss', | ||
63 | dest: 'build/styles', | ||
64 | }, | ||
61 | scripts: { | 65 | scripts: { |
62 | src: 'src/**/*.js', | 66 | src: 'src/**/*.js', |
63 | dest: 'build/', | 67 | dest: 'build/', |
@@ -164,6 +168,33 @@ export function styles() { | |||
164 | .pipe(gulp.dest(paths.styles.dest)); | 168 | .pipe(gulp.dest(paths.styles.dest)); |
165 | } | 169 | } |
166 | 170 | ||
171 | export function verticalStyle() { | ||
172 | return gulp | ||
173 | .src(paths.verticalStyle.src) | ||
174 | .pipe( | ||
175 | sassVariables( | ||
176 | Object.assign( | ||
177 | { | ||
178 | $env: | ||
179 | process.env.NODE_ENV === 'development' | ||
180 | ? 'development' | ||
181 | : 'production', | ||
182 | }, | ||
183 | ...styleConfig, | ||
184 | ), | ||
185 | ), | ||
186 | ) | ||
187 | .pipe( | ||
188 | sass({ | ||
189 | includePaths: ['./node_modules', '../node_modules'], | ||
190 | }).on('error', sass.logError), | ||
191 | ) | ||
192 | .pipe((gulpIf(process.env.NODE_ENV !== 'development', csso({ // Only minify in production to speed up dev builds | ||
193 | restructure: false, // Don't restructure CSS, otherwise it will break the styles | ||
194 | })))) | ||
195 | .pipe(gulp.dest(paths.verticalStyle.dest)); | ||
196 | } | ||
197 | |||
167 | export function scripts() { | 198 | export function scripts() { |
168 | return gulp | 199 | return gulp |
169 | .src(paths.scripts.src, { since: gulp.lastRun(scripts) }) | 200 | .src(paths.scripts.src, { since: gulp.lastRun(scripts) }) |
@@ -179,6 +210,7 @@ export function scripts() { | |||
179 | export function watch() { | 210 | export function watch() { |
180 | gulp.watch(paths.packages.watch, mvLernaPackages); | 211 | gulp.watch(paths.packages.watch, mvLernaPackages); |
181 | gulp.watch(paths.styles.watch, styles); | 212 | gulp.watch(paths.styles.watch, styles); |
213 | gulp.watch(paths.verticalStyle.src, verticalStyle); | ||
182 | 214 | ||
183 | gulp.watch([paths.src, `${paths.scripts.src}`, `${paths.styles.src}`], mvSrc); | 215 | gulp.watch([paths.src, `${paths.scripts.src}`, `${paths.styles.src}`], mvSrc); |
184 | 216 | ||
@@ -205,7 +237,7 @@ export function recipeInfo() { | |||
205 | const build = gulp.series( | 237 | const build = gulp.series( |
206 | clean, | 238 | clean, |
207 | gulp.parallel(mvSrc, mvPackageJson, mvLernaPackages), | 239 | gulp.parallel(mvSrc, mvPackageJson, mvLernaPackages), |
208 | gulp.parallel(html, scripts, styles, recipes, recipeInfo), | 240 | gulp.parallel(html, scripts, styles, verticalStyle, recipes, recipeInfo), |
209 | ); | 241 | ); |
210 | export { build }; | 242 | export { build }; |
211 | 243 | ||