Demo of stripped down version of TypeScript Library Starter: https://github.com/alexjoverm/typescript-library-starter
All the goodness of TypeScript Library Starter, but without:
The following additions are included:
git clone https://github.com/tonysneed/typescript-library-starter-lite.git YOURFOLDERNAMEcd YOURFOLDERNAME# Run npm install and write your library name when asked. That's all!npm install
package.json and entry files are already set up for you, so don't worry about linking to your main file, typings, etc. Just keep those files with the same names.
npm installthings will be setup for you 😉
gh-pages, using TypeDoc
On library development, one might want to set some peer dependencies, and thus remove those from the final bundle. You can see in Rollup docs how to do that.
The good news is here is setup for you, you only must include the dependency name in
external property within
rollup.config.js. For example, if you wanna exclude
lodash, just write there
npm t: Run test suite
npm start: Runs
npm run buildin watch mode
npm run test:watch: Run test suite in interactive watch mode (Cmd + Shift + T)
npm run test:prod: Run linting and generate coverage
npm run build: Generate bundles and typings, create docs (Cmd + Shift + B)
npm run lint: Lints code (Ctrl + Shift + L)
Prerequisites: you need to create/login accounts and add your project to:
Run the following command to prepare hooks and stuff:
npm run semantic-release-prepare
Follow the console instructions to install semantic release run it (answer NO to "Generate travis.yml").
npm install -g semantic-release-clisemantic-release-cli setup# IMPORTANT!! Answer NO to "Generate travis.yml" question. Is already prepared for you :P
After pushing your first commit to master, Travis CI will run a CI build that runs your tests and generates documentation for your library.
By default, there is a disabled git hook. It's set up when you run the
npm run semantic-release-prepare script. They make sure:
When you're ready to publish a release on GitHub, just do it.
To publish to NPM manually, just follow their instructions.
npm installdoing the first time runned?
It runs the script
tools/init which sets up everything for you. In short, it:
package.json(typings file, main file, etc)