Author: Kristiyan Velkov
- Kristiyan Velkov - Presentation for Unit Testing
- Kristiyan Velkov - Testing Different types
- Kristiyan Velkov - Rules of unit testing
- Generate an application
- Remove applications
- Generate a library
- Development server
- Code scaffolding
- Build the application
- Running unit tests
- Understand your workspace
- Further help
This project was generated using Nx.
Run nx g @nrwl/angular:app my-app
to generate an application.
When using Nx, you can generate multiple applications and libraries in the same workspace.
Run nx g rm my-app
Run nx g @nrwl/angular:lib my-lib
to generate a library.
You can also use any of the plugins above to generate libraries as well.
Libraries are shareable across libraries and applications. They can be imported from @your-team/my-lib
.
Run nx serve my-app
for a dev server or nx serve
for default app. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
By default, the app should run via webpack proxy (proxy.conf.json) targeting a remote API.
Run nx generate component my-component --project=my-app
to generate a new component.
Or simply nx g c my-component
to generate it. Other Angular CLI commands also work.
Run nx build my-app
to build the project or nx build
for default app. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run nx test my-app
to execute the unit tests via Jest.
Run nx affected:test
to execute the unit tests affected by a change.
Run nx e2e my-app-e2e
to execute the end-to-end tests via Cypress.
Run nx affected:e2e
to execute the end-to-end tests affected by a change.
Run nx dep-graph
to see a diagram of the dependencies of your projects.
Run yarn lint:fix
to check the code style and possible to fix it
Run yarn test-and-lint
to run tests and code style checks on CI
Run yarn code-coverage
to generate coverage
Run yarn bundle-analyze
to see the prod package files and what's inside them.
Run yarn bundle-source-maps
for a similar view based on source-maps
On each commit linting will occur.
If you have any questions or problems, please do not hesitate to contact me!