Lets you focus on the stuff that matters
Schematics that wrap the Angular generate library schematics and provide all the standard boilerplate you need in order to create a neat Angular open-source project.
ng add @ngneat/lib @scope/toaster
Several files were created. Let's go over them:
build:lib- Builds the library
test:lib- Runs tests
test:lib:headless- Runs tests in headless mode with Chrome
release- Releases a new version. This will bump the library's version, and update the
CHANGE_LOGfile based on the commit message
release:first- Creates the first release
commit- Creates a new commit message based on Angular commit messgae convention
contributors:add- Adds a new contributor to the
pre-commit: Runs prettier on the staged files, and verifies that they don't contain
pre-push: Runs the
addcommand updates the
tsconfig.jsonfile so that you can import any files from the npm path (
@scope/name) rather than from relative paths.
It also populates the library's
package.jsonwith the initial required information. Make sure you verify the data is accurate before proceeding.
Basic Working Flow
- Write specs
npm run test:lib,
npm run commit, and choose
npm run release
npm run build:lib
- Go to the
distdirectory, and run
Skipping the Library Creation
The schematics provide the --skip-lib flag for cases where we want to generate everything except the library.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!