aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.babel.js
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-10-11 20:16:18 +0200
committerLibravatar GitHub <noreply@github.com>2020-10-11 19:16:18 +0100
commit3eb55287d9df74dae7e8196487e7038fec04d4ce (patch)
treeb58ec428c018102b49ee719532a3c27e140d2a78 /gulpfile.babel.js
parentImprove Ferdi's design (#977) (diff)
downloadferdium-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.js34
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
171export 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
167export function scripts() { 198export 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() {
179export function watch() { 210export 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() {
205const build = gulp.series( 237const 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);
210export { build }; 242export { build };
211 243