From dce723c404a11c4db440ac2081cc77913c4a5691 Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Sun, 20 Oct 2024 00:43:06 -0400 Subject: [PATCH] Automatically update CLI help on readme before publishing --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index c5bd768..6c55ad4 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "scripts": { "build": "coffee -c -o build/ src/", "prepare": "npm run build", + "prepublishOnly": "npm run update-cli-docs", "test": "npm run build && node src/test.js", "update-cli-docs": "node -e \"const fs = require('fs'); fs.writeFileSync('README.md', fs.readFileSync('README.md', 'utf8').replace(/```HELP_OUTPUT.+?```/s, '```HELP_OUTPUT\\n' + require('child_process').execSync('ascii-hypercube --help').toString().trim() + '\\n```'))\"" },