Skip to content

Commit 5941050

Browse files
author
Maledong
authored
update README.md (#3708)
Considering that we've got many changes by adding more commands into the project, README.md is a bit out of date, this is the fixture for it.
1 parent e1988f1 commit 5941050

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,24 @@ To help with localization, please read the [TRANSLATION](TRANSLATION.md) guide.
5858

5959
## Serve/Build Options
6060

61-
* `DEFAULT_LOCALE={{locale}} npm run serve` builds only the files present in the specified locale folder (will display 404 status code if file is not present)
62-
* `DEFAULT_LOCALE={{locale}} npm run serve -- --preserveLocale` builds the files present in the specified locale folder and adds the pages present in the English locale that are missing.
63-
* `npm run serve` builds all languages and returns 404 when a file is not present in the current locale
64-
* `npm run serve -- --preserveLocale` builds all languages and adds the pages present in the English locale that are missing.
65-
* Multiple locales can be built by using comma separated values in the `DEFAULT_LOCALE` variable. i.e: `DEFAULT_LOCALE=en,es,it`
61+
* `DEFAULT_LOCALE={{locale}} node build.js` builds all the translated files present in the locale folder (will display 404 status code if file is not present), the static/css folder for all the Sass files, as well as copy the rest of the static assets to their subfolder in the build directory.
62+
* `DEFAULT_LOCALE={{locale}} node build.js --preserveLocale` the same as `node build.js` but it will add the pages present in the English locale that are missing instead of throwing 404 status code.
63+
* `DEFAULT_LOCALE={{locale}} npm run serve` builds only the files present in the specified locale folder (will display 404 status code if file is not present), then start the default website (http://localhost:${port}/${mainLocale}). Here `{port}` is 8080, `{mainLocale}` is `en` or the first specified language.
64+
* `DEFAULT_LOCALE={{locale}} npm run serve -- --preserveLocale` the same as `npm run serve ` but it will add the pages present in the English locale that are missing.
65+
* `npm run serve` builds all the current languages and returns 404 when a file is not present in the current locale, then start the default website (http://localhost:${port}/${mainLocale}). Here `{port}` is 8080, `{mainLocale}` is `en` in default.
66+
* `npm run serve -- --preserveLocale` the same as `npm run serve` but it will add the pages present in the English locale that are missing instead of throwing 404 status code.
67+
68+
## Test Options
69+
70+
Before submitting, you must pass all the unit tests and syntax checks by running the two commands below:
71+
72+
* `npm-run-all test:lint test:unit` run all the unit test cases in `tests` folder, as well as check syntax with eslint.
73+
* `npm-run-all --parallel test:lint:*` run all the syntax checks for `js`, `md` and other related files.
74+
75+
## Notice
76+
77+
* Multiple locales can be built by using comma separated values in the `DEFAULT_LOCALE` variable. i.e: `DEFAULT_LOCALE=en,es,it`.
78+
* For other 'Serve/Build Options' and 'Test Options', plese see `package.json` in details.
6679

6780
## Deployment
6881

0 commit comments

Comments
 (0)