0.0.2 • Published 3 years ago
@aacc/tsc-ts v0.0.2
Initialize project
npm initInstall typescript
npm i -D typescriptInstall typescript configs
npm i -D @aacc/tsconfigsSetup TypeScript configs
Reference local configs:
tsconfig.jsonserves as the base for both module outputstsconfig-esm.jsonextends base and is used build to the ESM outputtsconfig-cjs.jsonextends base and is used to build to CJS output
Configure package.json
Reference local package.json, specify:
main,module, andtypeskeys- conditional
exportskey build,add-build-pkgs, andtype-checkscripts
References:
- https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html
- https://antfu.me/posts/publish-esm-and-cjs
TODO:
- Read up on pre/post NPM scripts: https://docs.npmjs.com/cli/v8/using-npm/scripts