An opinionated typescript starter project with focus on packaging modern code for ES modules on Browser and NodeJS runtimes.
- Transpiles Typescript source to ES2018 files.
- Specifyes
type: "module"
inpackage.json
to assume all.js
files are using ES modules.- Can still write
commonjs
files via.cjs
file extension. - See docs for more info.
- Can still write
- Output a type declaration file to
lib/main.d.ts
.
- Git
- Nixos/Nix (w/ or w/o direnv) OR nvm OR nodjs installed on system.
git clone https://github.com/rencire/ts-lib-starter <your_project_name>
cd <your_project_name>
rm -rf .git
Choose one of the following:
If you're using nix, and have direnv installed (e.g. nix-env -i direnv
), simply
cd` into this repo and the correct nodejs version will be installed.
Simply run:
nix-shell
If you have nvm, a .nvmrc
file is provided.
-
migrate scripts outside of package.json
- simple bash scripts?
- consider going old school and use
makefile
for more complicated build workflows: http://www.olioapps.com/blog/the-lost-art-of-the-makefile/- If need more integration w/ js ecosystem, consider jakefile
-
[] add semantic release: