Merge pull request #2528 from vector-im/dbkr/package_is_now_dist

Rename the package script/output dir to 'dist'
pull/2543/head
David Baker 2016-11-01 15:48:06 +00:00 committed by GitHub
commit ba7e02c3b1
4 changed files with 8 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
/build /build
/cert.pem /cert.pem
/dist
/karma-reports /karma-reports
/key.pem /key.pem
/lib /lib

View File

@ -54,14 +54,14 @@ to build.
&& npm install)` && npm install)`
1. Configure the app by copying `config.sample.json` to `config.json` and 1. Configure the app by copying `config.sample.json` to `config.json` and
modifying it (see below for details) modifying it (see below for details)
1. `npm run package` to build a tarball to deploy. Untaring this file will give 1. `npm run dist` to build a tarball to deploy. Untaring this file will give
a version-specific directory containing all the files that need to go on your a version-specific directory containing all the files that need to go on your
web server. web server.
Note that `npm run package` is not supported on Windows, so Windows users can run `npm Note that `npm run dist` is not supported on Windows, so Windows users can run `npm
run build`, which will build all the necessary files into the `vector` run build`, which will build all the necessary files into the `vector`
directory. The version of Vector will not appear in Settings without directory. The version of Vector will not appear in Settings without
using the package script. You can then mount the vector directory on your using the dist script. You can then mount the vector directory on your
webserver to actually serve up the app, which is entirely static content. webserver to actually serve up the app, which is entirely static content.
config.json config.json

View File

@ -33,7 +33,7 @@
"build:bundle:dev": "webpack --optimize-occurence-order --progress", "build:bundle:dev": "webpack --optimize-occurence-order --progress",
"build": "node scripts/babelcheck.js && npm run build:emojione && npm run build:css && npm run build:bundle", "build": "node scripts/babelcheck.js && npm run build:emojione && npm run build:css && npm run build:bundle",
"build:dev": "npm run build:emojione && npm run build:css && npm run build:bundle:dev", "build:dev": "npm run build:emojione && npm run build:css && npm run build:bundle:dev",
"package": "scripts/package.sh", "dist": "scripts/package.sh",
"start:emojione": "cpx \"node_modules/emojione/assets/svg/*\" vector/emojione/svg/ -w", "start:emojione": "cpx \"node_modules/emojione/assets/svg/*\" vector/emojione/svg/ -w",
"start:js": "webpack -w --progress --no-cache-buster", "start:js": "webpack -w --progress --no-cache-buster",
"start:js:prod": "NODE_ENV=production webpack -w --progress --no-cache-buster", "start:js:prod": "NODE_ENV=production webpack -w --progress --no-cache-buster",

View File

@ -5,11 +5,11 @@ set -e
version=`git describe --dirty --tags || echo unknown` version=`git describe --dirty --tags || echo unknown`
npm run build npm run build
mkdir -p packages mkdir -p dist
cp -r vector vector-$version cp -r vector vector-$version
echo $version > vector-$version/version echo $version > vector-$version/version
tar chvzf packages/vector-$version.tar.gz vector-$version tar chvzf dist/vector-$version.tar.gz vector-$version
rm -r vector-$version rm -r vector-$version
echo echo
echo "Packaged packages/vector-$version.tar.gz" echo "Packaged dist/vector-$version.tar.gz"