]> git.saurik.com Git - logizomai.git/commitdiff
Use json5+rpl to make package.json reasonable-ish.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 23 Oct 2017 08:23:58 +0000 (01:23 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 23 Oct 2017 08:23:58 +0000 (01:23 -0700)
.gitignore
.npmignore
make
package.json [deleted file]
package.json5 [new file with mode: 0644]
publish [new file with mode: 0755]

index 3d670dfdddeeea4e67705f3e402a1689f8a67ab1..0b40c0f3ee56fef02a63037c0b9ec0ee9a315fcd 100644 (file)
@@ -1,3 +1,4 @@
 /dist
 /node_modules
 /npm-debug.log
+/package.json
index a65b41774ad52b3cc7b60496d35eaafc5da4bb16..8ec1da0398cbfef90f73bdc731ec7ac07263f5e3 100644 (file)
@@ -1 +1,2 @@
 lib
+/package.json5
diff --git a/make b/make
index 5823aba68be4cbf82219fb214404d22a1c6a4b80..d1704997782f9507027a8821eb70517eb4609cbb 100755 (executable)
--- 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.json
deleted file mode 100644 (file)
index 25ea770..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-    "name": "logizomai",
-    "version": "0.9.0",
-    "license": "AGPL-3.0",
-    "author": {
-        "name": "Jay Freeman (saurik)",
-        "email": "saurik@saurik.com",
-        "url": "http://www.saurik.com/"
-    },
-    "description": "Deterministic Finalization via Reference Counting",
-    "repository": {
-        "type": "git",
-        "url": "https://git.saurik.com/logizomai.git"
-    },
-    "scripts": {
-        "build": "tsc",
-        "lint": "tslint --project .",
-        "prepare": "npm run build && npm run lint"
-    },
-    "main": "dist/index.js",
-    "types": "dist/index.d.ts",
-    "devDependencies": {
-        "@types/node": "8.0.15",
-        "browserify": "14.4.0",
-        "tsify": "3.0.1",
-        "typescript": "2.5.2"
-    }
-}
diff --git a/package.json5 b/package.json5
new file mode 100644 (file)
index 0000000..c564c02
--- /dev/null
@@ -0,0 +1,28 @@
+{
+    "name": "logizomai",
+    "version": "XXX",
+    "license": "AGPL-3.0",
+    "author": {
+        "name": "Jay Freeman (saurik)",
+        "email": "saurik@saurik.com",
+        "url": "http://www.saurik.com/",
+    },
+    "description": "Deterministic Finalization via Reference Counting",
+    "repository": {
+        "type": "git",
+        "url": "https://git.saurik.com/logizomai.git",
+    },
+    "scripts": {
+        "build": "tsc",
+        "lint": "tslint --project .",
+        "prepare": "npm run build && npm run lint",
+    },
+    "main": "dist/index.js",
+    "types": "dist/index.d.ts",
+    "devDependencies": {
+        "@types/node": "8.0.15",
+        "browserify": "14.4.0",
+        "tsify": "3.0.1",
+        "typescript": "2.5.2",
+    }
+}
diff --git a/publish b/publish
new file mode 100755 (executable)
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