A short description about what your library is.
Elaborate on the reason behind this library: why may people need it? What issues does it solve? How is it different from the similar libraries?
Go through the steps necessary to install, configure, and use your library.
npm install @lukaspolak/create-typescript-library
or
yarn add @lukaspolak/create-typescript-library
Reference the documentation website, or write the documentation straight in this README file.
Please read the Contribution guidelines to start with your awesome contributions!
There are a lot of similar libraries/packages on GitHub and npm, that can do the same. I wanted to enhance my programming skills, and I didn't want to find a unique name for the package.
- replace
create-typescript-library
with repository name - update
keywords
anddescription
inpackage.json
file - update
buildEsm.input
array with correct paths insiderollup.config.ts
file - replace quoted text in
README.md
file - create and add playground link to CodeSandbox
- add
Topics
to GitHub repository - remove
INITIALIZATION TODO
section
For React based library:
- install (
yarn add @types/react react -D
) dev dependencies. - change script for linting to:
"lint": "eslint './{src,test}/**/*.{ts,tsx}'",
- add
peerDependencies
object topackage.json
file
{
//...
"peerDependencies": {
"react": "^17.0.1" // replace `17.0.1` with latest version
}
}
Also update tsconfig.json
file with:
{
// ...
"compilerOptions": {
// ...
"allowSyntheticDefaultImports": true, // replace original
"jsx": "react", // add
"esModuleInterop": true // add
// ...
},
// ...
"include": ["src/**/*.ts"] // update this line accordingly
// ...
}
// test/tsconfig.json
{
// ...
"include": ["**/*.test.ts"] // update this line accordingly
}