A collection of useful odds and ends. Many of these come from stack overflow, but I'm tired of looking them up and adding TypeScript annotations each time I need them.
- Miscellaneous (Browser only.)
- Miscellaneous (Works with node.js and in the browser.)
- Support for the TCL programming language
Manually bump the package version number in package.json
. Then run npm update
to copy that version number into package-lock.json
.
Then type:
tsc
npx typedoc *.ts
git add .
git commit
git push
npm publish
I've never gotten this to work quite right.
In this directory: npm link
In the main / test program directory: npm link phil-lib
Special instructions if the main program uses vite: https://stackoverflow.com/questions/67964556/cant-support-npm-link-added-local-package-in-vite-cli
Sometimes I push to GitHub, but I don't publish to npm.
Then I run npm install https://github.com/TradeIdeasPhilip/phil-lib
in the main / test program directory.
Then I build and run the main program to test this library.
This means that people who install from the npm repository will only get things that have been tested. But I still have to publish untested code to GitHub.
I like the alternate format, described below, because it allowed me to make changes to the main program and the library at the same time.
I could build and test everything locally, before committing, publishing, or otherwise sharing anything.
npm link
is aimed at local testing, but I have multiple problems trying to use it.
If you don't like npm
see https://github.com/TradeIdeasPhilip/lib.