Skip to content

Latest commit

 

History

History
104 lines (70 loc) · 2.12 KB

commands.md

File metadata and controls

104 lines (70 loc) · 2.12 KB

Commands

This file describes the commands that can be run for this library.

/!\ The commands are run from the project's root directory.

  • Go here to know more about the library.
  • Go here to see more project commands.

Table of contents

Running commands

The running commands lint of test the library code.

Lint

As in the lint section, the library code can be linted with the following command:

npm run libs:ng:lint

And its corrector:

npm run libs:ng:lint:fix

Check also the styleguide.

Test

As in the test section, the library code can be tested with the following command:

npm run libs:ng:test

If developing at the same time, enable the watch mode:

npm run libs:ng:test:watch

Code generation

Generate Angular files

The Angular CLI is a useful tool that can be used via Nx. The latest proposes a lot of commands, especially the generators.

Generate modules

Modules can be generated with the following command:

nx g @nx/angular:module --project=ng <module>

Generate services

Services can be generated with the following command:

nx g @nx/angular:service --project=ng <service>

Generate components

Components can be generated with the following command:

nx g @nx/angular:component --project=ng <component>

I18n

The following sections describe the commands related to I18n.

Extract I18n

The I18n keys can be extracted with the following command:

npm run libs:ng:i18n:extract