mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
site build fixes
This commit is contained in:
13
gulpfile.js
13
gulpfile.js
@@ -20,9 +20,12 @@ const gulp = require('gulp'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
YAML = require('yaml'),
|
||||
yargs = require('yargs/yargs'),
|
||||
cp = require('child_process'),
|
||||
pkg = require('./package.json'),
|
||||
year = new Date().getFullYear();
|
||||
year = new Date().getFullYear(),
|
||||
argv = yargs(process.argv).argv;
|
||||
|
||||
|
||||
let BUILD = false,
|
||||
distDir = './.tmp',
|
||||
@@ -233,7 +236,13 @@ gulp.task('watch-jekyll', (cb) => {
|
||||
*/
|
||||
gulp.task('build-jekyll', (cb) => {
|
||||
var env = Object.create(process.env);
|
||||
env.JEKYLL_ENV = 'production';
|
||||
|
||||
if(argv.preview) {
|
||||
env.JEKYLL_ENV = 'preview';
|
||||
}
|
||||
else {
|
||||
env.JEKYLL_ENV = 'production';
|
||||
}
|
||||
|
||||
return spawn('bundle', ['exec', 'jekyll', 'build', '--destination', demoDir, '--trace'], { env: env, stdio: 'inherit' })
|
||||
.on('close', cb);
|
||||
|
||||
Reference in New Issue
Block a user