Skip to content

Commit 874123b

Browse files
committed
Move package script out and make it tar into a versioned top level directory. It may as well be a shell script since it's unix specific anyway, and maintaining it inside package.json is now impractical.
1 parent b088651 commit 874123b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"build:compile": "babel --source-maps -d lib src",
1818
"build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js",
1919
"build": "npm run build:css && npm run build:compile && npm run build:bundle",
20-
"package": "npm run build && mkdir -p packages && tar chvzf packages/vector-`git describe --dirty --tags || echo unknown`.tar.gz vector",
20+
"package": "scripts/package.sh",
2121
"start:js": "webpack -w src/vector/index.js vector/bundle.js",
2222
"start:js:prod": "NODE_ENV=production webpack -w src/vector/index.js vector/bundle.js",
2323
"start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css",

scripts/package.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
version=`git describe --dirty --tags || echo unknown`
6+
7+
npm run build
8+
mkdir -p packages
9+
ln -s vector vector-$version
10+
tar chvzf packages/vector-$version.tar.gz vector-$version
11+
rm vector-$version
12+
13+
echo
14+
echo "Packaged packages/vector-$version.tar.gz"

0 commit comments

Comments
 (0)