2016-05-20 22:37:10 +03:00
|
|
|
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
require('shelljs/global');
|
|
|
|
|
|
|
|
var paths = require('./paths');
|
|
|
|
var path = require('path');
|
|
|
|
|
2016-05-29 20:47:38 +03:00
|
|
|
set('-e');
|
|
|
|
set('-v');
|
2016-05-20 22:37:10 +03:00
|
|
|
|
|
|
|
// build
|
|
|
|
exec('npm run build-dist');
|
|
|
|
cd('demo');
|
|
|
|
mkdir('-p', 'dist');
|
|
|
|
cp('-R', '../dist/*', './dist/');
|
|
|
|
cd('..');
|
2016-05-29 20:47:38 +03:00
|
|
|
|
2016-05-20 22:37:10 +03:00
|
|
|
var version = 'v' + require(path.join(__dirname, '../package.json')).version + '/';
|
|
|
|
var versionDir = path.join(paths.releases, version);
|
2016-05-29 20:47:38 +03:00
|
|
|
var latestDir = path.join(paths.releases, 'latest/');
|
2016-05-20 22:37:10 +03:00
|
|
|
mkdir('-p', versionDir)
|
2016-05-29 20:47:38 +03:00
|
|
|
mkdir('-p', latestDir);
|
2016-05-20 22:37:10 +03:00
|
|
|
cp(paths.redocBuilt + '.min.js', versionDir);
|
2016-05-29 20:47:38 +03:00
|
|
|
cp(paths.redocBuilt + '.min.js', latestDir);
|