diff --git a/README.md b/README.md index 01c6bba..41f8981 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ See the **TypeScript Declarations** at the top of [esm-to-plain-js.ts](esm-to-pl
--- -**CLI Build Tools** +**CLI Build Tools for package.json** - 🎋 [add-dist-header](https://github.com/center-key/add-dist-header):  _Prepend a one-line banner comment (with license notice) to distribution files_ - 📄 [copy-file-util](https://github.com/center-key/copy-file-util):  _Copy or rename a file with optional package version number_ - 📂 [copy-folder-util](https://github.com/center-key/copy-folder-util):  _Recursively copy files from one folder to another folder_ diff --git a/package.json b/package.json index 486053a..fc6ea18 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,10 @@ "bin": { "esm-to-plain-js": "bin/cli.js" }, - "repository": "github:center-key/esm-to-plain-js", + "repository": { + "type": "git", + "url": "git+https://github.com/center-key/esm-to-plain-js.git" + }, "homepage": "https://github.com/center-key/esm-to-plain-js", "bugs": "https://github.com/center-key/esm-to-plain-js/issues", "docs": "https://github.com/center-key/esm-to-plain-js#readme", @@ -82,13 +85,13 @@ }, "devDependencies": { "@types/fancy-log": "~2.0", - "@types/node": "~20.5", - "@typescript-eslint/eslint-plugin": "~6.6", - "@typescript-eslint/parser": "~6.6", + "@types/node": "~20.6", + "@typescript-eslint/eslint-plugin": "~6.7", + "@typescript-eslint/parser": "~6.7", "add-dist-header": "~1.3", "assert-deep-strict-equal": "~1.1", "copy-file-util": "~1.1", - "eslint": "~8.48", + "eslint": "~8.50", "jshint": "~2.13", "mocha": "~10.2", "rimraf": "~5.0", diff --git a/task-runner.sh.command b/task-runner.sh.command index 5d6d118..8a0f1c7 100755 --- a/task-runner.sh.command +++ b/task-runner.sh.command @@ -32,13 +32,14 @@ setupTools() { releaseInstructions() { cd $projectHome - repository=$(grep repository package.json | awk -F'"' '{print $4}' | sed s/github://) - package=https://raw.githubusercontent.com/$repository/main/package.json + org=$(grep git+https package.json | awk -F'/' '{print $4}') + name=$(grep '"name":' package.json | awk -F'"' '{print $4}') + package=https://raw.githubusercontent.com/$org/$name/main/package.json version=v$(grep '"version"' package.json | awk -F'"' '{print $4}') pushed=v$(curl --silent $package | grep '"version":' | awk -F'"' '{print $4}') minorVersion=$(echo ${pushed:1} | awk -F"." '{ print $1 "." $2 }') released=$(git tag | tail -1) - published=v$(npm view $repository version) + published=v$(npm view $name version) test $? -ne 0 && echo "NOTE: Ignore error if package is not yet published." echo "Local changes:" git status --short