https://github.com/stefnotch/npm-typescript-template
A little template repository for NPM packages that use Typescript
https://github.com/stefnotch/npm-typescript-template
Last synced: 10 days ago
JSON representation
A little template repository for NPM packages that use Typescript
- Host: GitHub
- URL: https://github.com/stefnotch/npm-typescript-template
- Owner: stefnotch
- License: bsd-3-clause
- Created: 2023-01-15T21:07:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-21T12:05:52.000Z (about 2 years ago)
- Last Synced: 2025-01-11T07:50:15.768Z (over 1 year ago)
- Language: TypeScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# npm-typescript-template
A little template repository for NPM packages that use Typescript.
Use the template, make sure to fill out the `package.json` and get going!
## Scripts
- `npm run build`
- `npm run release`
## FAQ
- Typescript cannot find the library?
That's because this uses the [`"export"` field in the `package.json`](https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing). Go to your `tsconfig.json`, or create one if there is none, and set
```json
{
"compilerOptions": {
/* This tells Typescript that we're working with the new importing mechanisms */
"module": "nodenext",
}
}
```
Make sure to read [the documentation](https://www.typescriptlang.org/docs/handbook/esm-node.html) for what that means, among other things all the imports in your code might need a file extension.