mirror of
https://github.com/Redocly/redoc.git
synced 2025-04-28 20:53: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',
|
source: 'lib/**/*.js',
|
||||||
html: 'lib/**/*.html',
|
html: 'lib/**/*.html',
|
||||||
scss: 'lib/**/*.scss',
|
scss: 'lib/**/*.scss',
|
||||||
|
@ -8,4 +10,8 @@ module.exports = {
|
||||||
tmp: '.tmp/',
|
tmp: '.tmp/',
|
||||||
demo: 'demo/**/*',
|
demo: 'demo/**/*',
|
||||||
tests: '{lib,tests}/**/*.spec.js'
|
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 replace = require('gulp-replace');
|
||||||
var rename = require('gulp-rename');
|
var rename = require('gulp-rename');
|
||||||
|
|
||||||
paths.redocBuilt = path.join(paths.output, paths.outputName);
|
|
||||||
|
|
||||||
gulp.task('build', function (callback) {
|
gulp.task('build', function (callback) {
|
||||||
return runSequence(
|
return runSequence(
|
||||||
'clean',
|
'clean',
|
||||||
|
@ -96,7 +94,8 @@ function bundle(outputFile, minify, cb) {
|
||||||
{ format:'umd', sourceMaps: true, mangle: false, lowResSourceMaps: true, minify: minify }
|
{ format:'umd', sourceMaps: true, mangle: false, lowResSourceMaps: true, minify: minify }
|
||||||
)
|
)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
cb();
|
// wait some time to allow flush
|
||||||
|
setTimeout(() => cb(), 500);
|
||||||
})
|
})
|
||||||
.catch(function(err) {
|
.catch(function(err) {
|
||||||
cb(new Error(err));
|
cb(new Error(err));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user