mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-23 00:56:33 +03:00
25 lines
591 B
JavaScript
Executable File
25 lines
591 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
'use strict';
|
|
require('shelljs/global');
|
|
|
|
var paths = require('./paths');
|
|
var path = require('path');
|
|
|
|
set('-e');
|
|
set('-v');
|
|
|
|
// build
|
|
exec('npm run build-dist');
|
|
cd('demo');
|
|
mkdir('-p', 'dist');
|
|
cp('-R', '../dist/*', './dist/');
|
|
cd('..');
|
|
|
|
var version = 'v' + require(path.join(__dirname, '../package.json')).version + '/';
|
|
var versionDir = path.join(paths.releases, version);
|
|
var latestDir = path.join(paths.releases, 'latest/');
|
|
mkdir('-p', versionDir)
|
|
mkdir('-p', latestDir);
|
|
cp(paths.redocBuilt + '.min.js', versionDir);
|
|
cp(paths.redocBuilt + '.min.js', latestDir);
|