feat: add bundling opportunity (#177)

* feat: add bundling opportunity

* chore: change flag name for bundle

* feat: add bundle & upload commands to build

* chore: ignore simple-websocket for bundle

* chore: remove net module

* feat: add configurable --profile for aws cli

* chore: remove externals from webpack config

* chore: add websocket comment

* chore: rename bundle uploading script

* chore: add shebang-loader

* chore: null-load fsevents

* chore: remove node-loader
This commit is contained in:
Sergey Dubovyk
2020-08-13 13:51:12 +03:00
committed by GitHub
parent 57411415da
commit 81ade196d2
7 changed files with 4954 additions and 719 deletions

View File

@@ -0,0 +1,24 @@
const yargs = require('yargs');
const { execSync } = require('child_process');
const package = require('../package.json');
const version = package.version;
const fileName = `openapi-cli.${version}.tar.gz`;
const fileNameLatest = `openapi-cli.latest.tar.gz`;
execSync(`tar -zcvf ${fileName} dist`);
execSync(`tar -zcvf ${fileNameLatest} dist`);
const argv = yargs
.option('aws_profile', {
alias: 'p',
type: 'string',
})
.argv;
let profile = !!argv.aws_profile ? `--profile ${argv.aws_profile}` : '';
execSync(`aws s3 cp ${fileName} s3://openapi-cli-dist ${profile}`);
execSync(`aws s3 cp ${fileNameLatest} s3://openapi-cli-dist ${profile}`);