diff --git a/.travis.yml b/.travis.yml index ec37078a..077a1cc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,6 +41,11 @@ deploy: secure: PuhWLERrCEFmXmdFpw2OVFlqpOIVDmgwk5JUJOYaFdVCh/smp0+jZCQ4vrdFpuG96rnDVirD+A8xvW6NgsNNaRthLgOB/LRdFN69rU6Gvn3At6wlnC55t5dlhxPvCfnzJcHVBLXX4EmMkjnZqDg2uczXTzPodr3FnQJNuXmP8B33fzDVLyHccvXZ90abwXWVrgRIXPU28niqCR8DOC2OTzs7wqz+BLNkYDRRbyYXsg62HWuD33x5iof5IqBmhzBt3usCGmF3QGcgHrXHdZw3sZnit8+Bua++3KrXR0x6HGXXN1AoXVmCAkCa5OTQ5R3tCRxiJN3P2KLnvWeZR74sTFkovJB/6pGCvbJ/c7Wnuw6sD7SgOUBD359ULB6lAf5OnxBLoNebX4JxxVXF+zA4E3Bl44VxkzDpPWc15xqBPMB5vBREzMVmJ5mExn2s5cmLQjADbl9h0y6gZnhnNJ+iTmqtrVyM0ZkF2rPrzrTdGD+ULmRIlTMkdD1bh+/TJ3RdXT3P4/zNUJmiNnvgnnJVYYvsGaXWF+7uCVHT/8k2RsoSHqgkqh0gkDqGSwVix55y5mC7T2Vk9lMBhm6MvFJXaonOX0kxJS4EDQ3plPd6/ybG+TLhwggYnQ8o9msU5Nt6FpUShKiezjKurIhbQZdwlVivX3tahjW2QjNDO58xGgY= on: tags: true + - skip_cleanup: true + provider: script + script: npm run github-release + on: + tags: true - skip_cleanup: true provider: script script: npm run branch-release diff --git a/build/paths.js b/build/paths.js index 06f5c267..e2f27ffe 100644 --- a/build/paths.js +++ b/build/paths.js @@ -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; diff --git a/build/tasks/build.js b/build/tasks/build.js index 46fc4dfa..ef14693b 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -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)); diff --git a/build/tasks/github-release.js b/build/tasks/github-release.js new file mode 100644 index 00000000..d2303cb2 --- /dev/null +++ b/build/tasks/github-release.js @@ -0,0 +1,12 @@ +var gulp = require('gulp'); +var release = require('gulp-github-release'); +var path = require('path'); +var paths = require('../paths'); + +gulp.task('github-release', ['build'], function(){ + gulp.src(paths.redocBuilt + '.min.js') + .pipe(release({ + token: process.env.GH_TOKEN, + manifest: require(path.join(__dirname, '../../package.json')) + })); +}); diff --git a/lib/components/JsonSchema/json-schema.html b/lib/components/JsonSchema/json-schema.html index bd3155ee..d1377c59 100644 --- a/lib/components/JsonSchema/json-schema.html +++ b/lib/components/JsonSchema/json-schema.html @@ -9,7 +9,7 @@ - +
{{_displayType}}