A starter kit for developing TypeScript libraries and automating their releases.
- TypeScript for scalable, statically typed JavaScript.
- ESLint for linting TypeScript.
- Prettier for formatting code.
- commitlint for commit linting via Husky Git hooks.
- Commitizen for standardized commit messages.
- webpack for bundling assets.
- semantic-release for effortless release management.
Clone this repository and delete the Git history:
git clone https://github.com/llorca/typescript-library-starter && rm -rf typescript-library-starter/.git
Search for the TLS_CONFIG
string in the project, then replace each occurrence with your desired configuration.
Initialize as a new repository:
git init
Install the dependencies:
npm install
Start the webpack development server:
npm run dev
Commit changes with Commitizen:
npm run commit
Sign in to your accounts on NPM and Travis.
Install semantic-release
:
npm install -g semantic-release-cli
Set it up. Note that the .travis.yml
file already exists so there's no need to create it again via this step.
npx semantic-release-cli setup
Finally, set up the GH_TOKEN
and NPM_TOKEN
environment variables. More information can be found in the semantic-release documentation.
From now on, a build will run through Travis after every push to the remote GitHub repository. If the build succeeds, a new release will be created on GitHub and published on NPM.