Move to yarn

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-04-10 17:30:18 +02:00
parent da2a0593ca
commit 166979a297
9 changed files with 42 additions and 365 deletions

View File

@@ -38,8 +38,8 @@ once the server is running:
* Install the NodeJS (we guarantee support for the latest LTS and later) ![](https://img.shields.io/badge/node-%3E%3D%2010.0+-brightgreen.svg)
* Change directory to `js/` and do:
* Install JavaScript package dependencies: `npm install`.
* Run the developement server in watch mode: `npm run dev`. This will open a
* Install JavaScript package dependencies: `yarn install`.
* Run the developement server in watch mode: `yarn run dev`. This will open a
browser on [`localhost:8080`](http://localhost:8080) that gets
automatically reloaded on change.

View File

@@ -13,9 +13,9 @@ These two commands must not return an error code, since they are required to pas
# Front
We use `tslint` with the `tslint-config-airbnb` preset.
Errors should be reported when running in dev mode `npm run dev` or when building a production bundle `npm run build`.
Errors should be reported when running in dev mode `yarn run dev` or when building a production bundle `yarn run build`.
Please run the following command before pushing code `npm run lint`.
Please run the following command before pushing code `yanr run lint`.
This command must not return an error code, since it's required to pass inside CI.

View File

@@ -18,6 +18,7 @@ sudo apt-get install curl sudo unzip vim
[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
4. Install NodeJS 10.x (current LTS):
[https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
5. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest): [yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab)
5. Install Erlang and Elixir:
[https://elixir-lang.org/install.html#unix-and-unix-like](https://elixir-lang.org/install.html#unix-and-unix-like)
6. Install PostGIS:
@@ -39,7 +40,7 @@ sudo systemctl start postgresql
1. Run:
```
sudo pacman -S nodejs postgresql openssl git wget unzip base-devel npm nginx elixir postgis
sudo pacman -S nodejs postgresql openssl git wget unzip base-devel yarn nginx elixir postgis
```
Now that dependencies are installed, before running MobiliZon you should start PostgreSQL and Redis:

View File

@@ -77,12 +77,12 @@ cd js/
and install the Javascript dependencies
```bash
npm install
yarn install
```
Finally, build the front-end with
```bash
npm run build
yarn run build
```
### Testing