- node v8.10
- npm v5.7.1 (npm i -g npm to upgrade)
As REGARDS frontend is developed around two main libraries, React and Redux, we highly recommand new developers to start by watching the here under Egghead videos to learn the basics of these two libraries.
New developers can also check at the Material-ui library which is used to design all components of the REGARDS frontend.
rs-frontend repository, available on GitHub and open the webapp folder in cloned repository using your terminal:
Then install all dependencies, and produce all required webpack DLL:
Please note that, after a new GIT branch checkout and when installed Node version is greater than 8, it may be required to delete all package-lock.json in project. It can be done using the following commands:
This two commands will generate the entire webapp for production environement with all plugins compiled.
The result is in the
dist/prod directory. You can ignore this step if you want to produce a production build.
Congratulation, you're now ready to launch the application !
The command below allow you to run the frontend webapp in development mode with hot sources reload.
However, you need to override the REGARDS gateway address by replacing
http://172.26.47.107 by the address
of your local REGARDS gateway instance in the
/webapp/webpack.dev.preprod.config.js file. Then you can launch :
Optionally, you may also build the plugins, using the following command in webapp folder:
Congratulation, you're now ready to access to your local front instance at the address localhost:3333.
Notes: -Some REGARDS NPM tasks provide runnable using the proxy mock server. You may want to look deeper in those tasks when developping new features or without backend -REGARDS NPM tasks are currently defined for continous integration servers at CS SI
The following command runs the app tests and create reports in
The following command runs application coverage (lcov, xunit) and reports in
The following command lint the REGARDS frontend application code and fixes automatically all formatting problems.
The developers should always run that comment before committing code files.
When you install this application, all these NPM warnings can be safely ignored :
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT
npm WARN optional SKIPPING OPTIONAL DEPENDENCY
npm WARN enoent ENOENT: no such file or directory
npm WARN <some dependency>@<version> requires a peer of <another dependency>@<version> but none is installed. You must install peer dependencies yourself.
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform
npm WARN rollback Rolling back <some dependency>@<version> failed (this is probably harmless)