diff --git a/README.md b/README.md index 2a04d4d..e345032 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,14 @@ XDG references # ref: @@ --> + + + ## Installation (CJS/ESM/TypeScript) @@ -241,7 +249,7 @@ const dataDirs = xdg.dataDirs(); -[^*]: With the conversion to a TypeScript-based project, due to tooling constraints, building and testing are more difficult and more limited on Node platforms earlier than NodeJS-v10. However, the generated CommonJS/UMD project code is fully tested (for NodeJS-v10+) and continues to be compatible with NodeJS-v4+. +[^*]: With the conversion to a TypeScript-based project, due to tooling constraints, building and testing are more difficult and more limited on Node platforms earlier than NodeJS-v12. However, the generated CommonJS/UMD project code is fully tested (for NodeJS-v12+) and continues to be compatible with NodeJS-v4+. #### CommonJS modules (CJS; `*.js` and `*.cjs`) @@ -337,7 +345,7 @@ This module was forked from [sindresorhus/xdg-basedir](https://github.com/sindre ### Build requirements -- NodeJS >= 10.14 +- NodeJS-v12+ - a JavaScript package/project manager ([`npm`](https://www.npmjs.com/get-npm) or [`yarn`](https://yarnpkg.com)) - [`git`](https://git-scm.com) @@ -356,10 +364,15 @@ npm install-test #### _Reproducible_ setup (for CI or local development) +
+ +> POSIX + + + ```shell git clone "https://github.com/rivy/js.xdg-portable" cd js.xdg-portable -# * note: for WinOS, replace `cp` with `copy` (or use [uutils](https://github.com/uutils/coreutils)) # npm cp .deps-lock/package-lock.json . npm clean-install @@ -368,10 +381,25 @@ cp .deps-lock/yarn.lock . yarn --immutable --immutable-cache --check-cache ``` +> WinOS + + + +```shell +git clone "https://github.com/rivy/js.xdg-portable" +cd js.xdg-portable +@rem # npm +copy /y .deps-lock\\package-lock.json . >NUL +npm clean-install +@rem # yarn +copy /y .deps-lock\\yarn.lock . >NUL +yarn --immutable --immutable-cache --check-cache +``` + #### Project development scripts ```shell -> npm run help +# npm run help ... usage: `npm run TARGET` or `npx run-s TARGET [TARGET..]` @@ -413,8 +441,13 @@ verify fully (and verbosely) test package ##### Package +
+ +> POSIX + + + ```shell -#=== * POSIX # update project VERSION strings (package.json,...) # * `bmp --[major|minor|patch]`; next VERSION in M.m.r (semver) format bmp --minor @@ -438,7 +471,13 @@ git commit --amend --no-edit git tag -f "v${VERSION}" # (optional) prerelease checkup npm run prerelease -#=== * WinOS +``` + +> WinOS + + + +```shell @rem # update project VERSION strings (package.json,...) @rem # * `bmp --[major|minor|patch]`; next VERSION in M.m.r (semver) format bmp --minor @@ -466,14 +505,33 @@ npm run prerelease ##### Publish +
+ +> POSIX + + + ```shell -# publish -# * optional (will be done in 'prePublishOnly' by `npm publish`) -npm run clean && npm run test && npm run dist && git-changelog > CHANGELOG.mkd #expect exit code == 0 +# optional (will be done in 'prePublishOnly' by `npm publish`) +npm run clean && npm run test && npm run dist && git-changelog > CHANGELOG.mkd # expect exit code == 0 git diff-index --quiet HEAD || echo "[lint] ERROR uncommitted changes" # expect no output and exit code == 0 -# * -npm publish # `npm publish --dry-run` will perform all prepublication actions and stop just before the actual publish push -# * if published to NPMjs with no ERRORs; push to deno.land with tag push +# +npm publish # note: `npm publish --dry-run` will perform all prepublication actions and stop just before the actual publish push +# if published to NPMjs with no ERRORs; push to deno.land with tag push +git push origin --tags +``` + +> WinOS + + + +```shell +@rem # optional (will be done in 'prePublishOnly' by `npm publish`) +npm run clean && npm run test && npm run dist && git-changelog > CHANGELOG.mkd &&@rem # expect exit code == 0 +git diff-index --quiet HEAD || echo "[lint] ERROR uncommitted changes" &&@rem # expect no output and exit code == 0 +@rem # +npm publish &&@rem # note: `npm publish --dry-run` will perform all prepublication actions and stop just before the actual publish push +@rem # if published to NPMjs with no ERRORs; push to deno.land with tag push git push origin --tags ```