From 8d8f8b1e2faaf8603a9621cd9345f2b11925ce3b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 23 Oct 2017 01:23:58 -0700 Subject: [PATCH] Use json5+rpl to make package.json reasonable-ish. --- .gitignore | 1 + .npmignore | 1 + make | 3 +++ package.json => package.json5 | 10 +++++----- publish | 5 +++++ 5 files changed, 15 insertions(+), 5 deletions(-) rename package.json => package.json5 (73%) create mode 100755 publish diff --git a/.gitignore b/.gitignore index 3d670df..0b40c0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /dist /node_modules /npm-debug.log +/package.json diff --git a/.npmignore b/.npmignore index a65b417..8ec1da0 100644 --- a/.npmignore +++ b/.npmignore @@ -1 +1,2 @@ lib +/package.json5 diff --git a/make b/make index 5823aba..d170499 100755 --- a/make +++ b/make @@ -1,2 +1,5 @@ #!/bin/bash +set -e +json5 -c package.json5 +rpl XXX $(git describe --tags --match="v*" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@@;s@%@~@g') package.json npm run prepare diff --git a/package.json b/package.json5 similarity index 73% rename from package.json rename to package.json5 index 25ea770..c564c02 100644 --- a/package.json +++ b/package.json5 @@ -1,21 +1,21 @@ { "name": "logizomai", - "version": "0.9.0", + "version": "XXX", "license": "AGPL-3.0", "author": { "name": "Jay Freeman (saurik)", "email": "saurik@saurik.com", - "url": "http://www.saurik.com/" + "url": "http://www.saurik.com/", }, "description": "Deterministic Finalization via Reference Counting", "repository": { "type": "git", - "url": "https://git.saurik.com/logizomai.git" + "url": "https://git.saurik.com/logizomai.git", }, "scripts": { "build": "tsc", "lint": "tslint --project .", - "prepare": "npm run build && npm run lint" + "prepare": "npm run build && npm run lint", }, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -23,6 +23,6 @@ "@types/node": "8.0.15", "browserify": "14.4.0", "tsify": "3.0.1", - "typescript": "2.5.2" + "typescript": "2.5.2", } } diff --git a/publish b/publish new file mode 100755 index 0000000..b702233 --- /dev/null +++ b/publish @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +git describe --tags --match="v*" --exact-match >/dev/null +./make +npm publish -- 2.47.2