Following Publishing Node modules with TypeScript and ES modules. https://blog.logrocket.com/publishing-node-modules-typescript-es-modules/
Go to file
James Skemp 2436430806 Add ESLint and docs 2023-03-04 22:48:14 -06:00
src Add ESLint and docs 2023-03-04 22:48:14 -06:00
.editorconfig Add ESLint and docs 2023-03-04 22:48:14 -06:00
.eslintrc.cjs Add ESLint and docs 2023-03-04 22:48:14 -06:00
.gitignore Update config to include declarations and ignore built files 2023-03-02 09:41:43 -06:00
README.md Add ESLint and docs 2023-03-04 22:48:14 -06:00
package-lock.json Add ESLint and docs 2023-03-04 22:48:14 -06:00
package.json Add ESLint and docs 2023-03-04 22:48:14 -06:00
tsconfig-cjs.json Add CommonJS module support and update where ES module files are created 2023-03-02 09:45:40 -06:00
tsconfig.json Add CommonJS module support and update where ES module files are created 2023-03-02 09:45:40 -06:00

README.md

NPM package with TypeScript

Following Publishing Node modules with TypeScript and ES modules.

Commands

npm init -y
git init
npm install --save-dev typescript
npx tsc --init
# Add code and configuration.
npx tsc -p tsconfig.json
# Move the above into package.json.
npm run tsc
# Run ESLint
npm run lint
# When ready.
npm publish