This file describes the commands that can be run for this application.
/!\ The commands are run from the project's root directory.
The running commands run an instance of the application or another processus.
There is a command to run the office
application in dev mode:
npm run office:start
The server will be listening on the port
5200
.
Unless another port is set:npm run office:start -- --port 5202
As in the lint section, the application code can be linted with the following command:
npm run office:lint
And its corrector:
npm run office:lint:fix
Check also the styleguide.
As for the global linting, it is possible to run each linter separately
- ESLint:
npm run office:lint:code
And its corrector:
npm run office:lint:code:fix
- Stylelint:
npm run office:lint:style
And its corrector:
npm run office:lint:style:fix
As in the test section, the library code can be tested with the following command:
npm run office:test
If developing at the same time, enable the watch mode:
npm run office:test:watch
See these commands to run the E2E tests.
Compodoc is a tool
that generates documentation from the comments of an Angular
application.
The documentation can be served with the following command:
npm run office:compodoc
The server will be listening on the port
5080
.
The documentation can also be generated to be served as static content:
npm run office:compodoc:build
The comment coverage can also be tested. In fact, it is one of the tests of the CI:
npm run office:compodoc:coverage
Storybook generates pages for the components of the application in which it is possible to modifie their parameters and see them changing.
It can be run, in watch mode, with the following command:
npm run office:storybook
The server will be listening on the port
5040
.
The content can also be compiled to be served statically:
npm run office:storybook:build
The Angular CLI is a useful tool
that can be used via Nx
.
The latest proposes a lot of commands,
especially the generators.
Also see the structure of the code.
Views can be generated with the following command:
nx g @nna/plugin:view --project=office <view>
To generate a dev view:
nx g @nna/plugin:view --project=office --dev <view>
It uses the plugin of the project.
Components can be generated with the following command:
nx g @nx/angular:component --project=office components/<component>
To generate a dev component:
nx g @nx/angular:component --project=office ../dev/components/<component>
To generate stories from the existing components:
npm run office:storybook:generate
The following sections describe the commands related to I18n.
The I18n keys can be extracted with the following command:
npm run office:i18n:extract