Skip to content

Commit

Permalink
Remove compiled CSS from directory, fix build step in Gulpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Jun 11, 2021
1 parent 856ac48 commit 730e6a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2,779 deletions.
13 changes: 7 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@ const merge = require('merge-stream');

// directory for building LESS, SASS, and bundles
const buildDir = 'static/scss/libs/';
const finalDir = 'static/css/';

// Compile all SASS/SCSS into => app.scss
gulp.task('styles', () => {
return gulp.src('static/scss/app.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./static/css/'));
.pipe(gulp.dest(finalDir));
});

// Clean out compiled CSS folder
gulp.task('clean', () => {
return del([
'static/css/*',
finalDir
]);
});

// On setup, remove
gulp.task('setup', () => {
return del([
'static/css/*',
finalDir,
buildDir,
]);
});
Expand All @@ -39,17 +40,17 @@ function assetsCopy() {
]);
}

const buildTask = gulp.series(
const buildTask = gulp.series([
'setup',
assetsCopy,
'styles',
);
]);

gulp.task('build', buildTask);

gulp.task('default', async () => {
// Build on first run
gulp.series('build');
gulp.series(buildTask);

// Watch for SCSS changes
gulp.watch('static/scss/**/*.scss', (done) => {
Expand Down
Loading

0 comments on commit 730e6a4

Please sign in to comment.