This is a starter project for creating open-source libraries for Angular. It is a full fledged Angular workspace with demo application and easy library addition. It is designed to be used for open-sourcing libraries on Github and has everything you'd need ready for CI, code coverage, SSR testing, StackBlitz demo deployment and more.
-
Run
npm i
to install everything -
Run
npm run add [your-library-name]
to create basic file structure -
Fill in
projects/[your-library-name]/package.json
metadata for your newly generated library -
Updated root
package.json
metadata to represent your project -
Code your library and create demo for it
-
Versioning is ready for you with following simple commands:
"release": "standard-version", "release:patch": "npm run release -- --release-as patch", "release:minor": "npm run release -- --release-as minor", "release:major": "npm run release -- --release-as major", "publish": "npm run build:all && npm publish:all"
Just use Conventional Commits format and
CHANGELOG.md
will be automatically generated on releases by Standard Version. -
This project has Angular Universal — you can easily test your library with SSR and Prerender:
npm run start:ssr
ornpm run start:prerender
-
CI and code coverage are ready, configured to use Travis and Coveralls. Just authorize on Travis with your Github account and enable your repository and do the same on Coveralls. If you want to have more than one library in your workspace add
COVERALLS_PARALLEL=true
to Travis Environmental variables. -
Precommit checks, prettier, linter and all that jazz is there.
-
You can also deploy your demo to StackBlitz with no hustle, just use link in the following format:
https://stackblitz.com/github/[User|Organization]/[Repository]/tree/master/projects/demo
-
You can add more libraries using the same
npm run add
command to create a whole Angular Workspace with multiple libraries. Versioning and publishing is configured that they are released simultaneously like Angular packages.
Don't need your library to support Angular 7 and below? Run following command to update packages for Angular 8+:
ng update @angular/cli @angular/compiler-cli @angular/core @nguniversal/common tsickle
Show that your project is based off of our starter
[![angular-open-source-starter](https://img.shields.io/badge/made%20with-angular--open--source--starter-d81676?logo=angular)](https://github.com/TinkoffCreditSystems/angular-open-source-starter)