angular-open-source-starter
angular-open-source-starter copied to clipboard
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-sou...
Angular Open-source Starter
How to use
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 ci
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 -
Add your email at [INSERT YOUR EMAIL HERE] in
CODE_OF_CONDUCT.md
-
Update
LICENSE
file according to your preferences -
Updated root
package.json
metadata to represent your project -
Code your library and create demo for it
Cool features
- [x] 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.
-
[x] This project has Angular Universal — you can easily test your library with SSR and Prerender:
npm run dev:ssr
ornpm run prerender
-
[x] CI and code coverage are ready, GitHub Action checks that packages build, test and lint correctly. It also sends test results to Codecov.
-
[x] Precommit checks, prettier, linter and all that jazz is there.
-
[x] 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/main/projects/demo
-
[x] 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.
Infrastructure
- [x] GitHub Actions
- [x] Node.js 16+, npm 8+
- [x] Angular 12+
- [x] TypeScript 4+
- [x] Prettier 2.6+
- [x] Stylelint 14+
- [x] ESLint 7+
- [x] Husky 7+
- [x] Cypress 9+
- [x] Jest 27+
- [x] Nx 13+
Badge
Show that your project is based off of our starter
[](https://github.com/Tinkoff/angular-open-source-starter)