mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +03:00
fix dist file is empty sometimes + minor config refactor
This commit is contained in:
parent
06e9dd3a0f
commit
6af848d0f4
|
@ -1,4 +1,6 @@
|
|||
module.exports = {
|
||||
var path = require('path');
|
||||
|
||||
var paths = {
|
||||
source: 'lib/**/*.js',
|
||||
html: 'lib/**/*.html',
|
||||
scss: 'lib/**/*.scss',
|
||||
|
@ -8,4 +10,8 @@ module.exports = {
|
|||
tmp: '.tmp/',
|
||||
demo: 'demo/**/*',
|
||||
tests: '{lib,tests}/**/*.spec.js'
|
||||
};
|
||||
}
|
||||
|
||||
paths.redocBuilt = path.join(paths.output, paths.outputName);
|
||||
|
||||
module.exports = paths;
|
||||
|
|
|
@ -12,8 +12,6 @@ var sass = require('gulp-sass');
|
|||
var replace = require('gulp-replace');
|
||||
var rename = require('gulp-rename');
|
||||
|
||||
paths.redocBuilt = path.join(paths.output, paths.outputName);
|
||||
|
||||
gulp.task('build', function (callback) {
|
||||
return runSequence(
|
||||
'clean',
|
||||
|
@ -96,7 +94,8 @@ function bundle(outputFile, minify, cb) {
|
|||
{ format:'umd', sourceMaps: true, mangle: false, lowResSourceMaps: true, minify: minify }
|
||||
)
|
||||
.then(function() {
|
||||
cb();
|
||||
// wait some time to allow flush
|
||||
setTimeout(() => cb(), 500);
|
||||
})
|
||||
.catch(function(err) {
|
||||
cb(new Error(err));
|
||||
|
|
Loading…
Reference in New Issue
Block a user