1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-22 01:44:25 +04:00

build fixes

This commit is contained in:
codecalm
2020-11-04 12:30:45 +01:00
parent 3a843a7dab
commit a5eacf14be

View File

@@ -125,12 +125,17 @@ gulp.task('unused-files', (cb) => {
/** /**
* Clean `dist` folder before build * Clean `dist` folder before build
*/ */
gulp.task('clean', () => { gulp.task('clean-dirs', () => {
return gulp return gulp
.src(`{${distDir}/*,${demoDir}/*}`, { read: false }) .src(`{${distDir}/*,${demoDir}/*}`, { read: false })
.pipe(clean()); .pipe(clean());
}); });
gulp.task('clean-jekyll', (cb) => {
return cp.spawn('bundle', ['exec', 'jekyll', 'clean'], { stdio: 'inherit' })
.on('close', cb);
});
/** /**
* Compile SASS to CSS and move it to dist directory * Compile SASS to CSS and move it to dist directory
*/ */
@@ -219,7 +224,7 @@ gulp.task('js', () => {
*/ */
gulp.task('watch-jekyll', (cb) => { gulp.task('watch-jekyll', (cb) => {
browserSync.notify('Building Jekyll'); browserSync.notify('Building Jekyll');
return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--watch', '--destination', demoDir], { stdio: 'inherit' }) return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--watch', '--destination', demoDir, '--trace'], { stdio: 'inherit' })
.on('close', cb); .on('close', cb);
}); });
@@ -230,7 +235,7 @@ gulp.task('build-jekyll', (cb) => {
var env = Object.create(process.env); var env = Object.create(process.env);
env.JEKYLL_ENV = 'production'; env.JEKYLL_ENV = 'production';
return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--destination', demoDir], { env: env, stdio: 'inherit' }) return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--destination', demoDir, '--trace'], { env: env, stdio: 'inherit' })
.on('close', cb); .on('close', cb);
}); });
@@ -333,6 +338,8 @@ gulp.task('add-banner', () => {
.pipe(gulp.dest(`${distDir}`)) .pipe(gulp.dest(`${distDir}`))
}); });
gulp.task('clean', gulp.series('clean-dirs', 'clean-jekyll'));
gulp.task('start', gulp.series('clean', 'sass', 'js', 'build-jekyll', gulp.parallel('watch-jekyll', 'watch', 'browser-sync'))); gulp.task('start', gulp.series('clean', 'sass', 'js', 'build-jekyll', gulp.parallel('watch-jekyll', 'watch', 'browser-sync')));
gulp.task('build-core', gulp.series('build-on', 'clean', 'sass', 'js', 'copy-images', 'copy-libs', 'add-banner')); gulp.task('build-core', gulp.series('build-on', 'clean', 'sass', 'js', 'copy-images', 'copy-libs', 'add-banner'));