|
@@ -66,7 +66,7 @@ TWELVE HEROES
|
|
|
* File *package-lock.json* is generated by npm. It never needs to be changed manually
|
|
|
* Directory *node_modules* contains all dependant libraries. It is not on git, it is only locally
|
|
|
* npm is usefull to keep track of dependencies and install them rapidly.
|
|
|
- * it provides npm scripts (see [**below**](#npm-scripts)). These are shortcuts for bilding, testing, deploying
|
|
|
+ * it provides npm scripts (see [**below**](#npm-scripts)). These are shortcuts for building, testing, deploying
|
|
|
|
|
|
### 2. Editor config & VS code settings
|
|
|
* File *.editorconfig* contains config for editing
|
|
@@ -119,8 +119,8 @@ TWELVE HEROES
|
|
|
"start": "npm-run-all --parallel server dev lint:watch",
|
|
|
"lint": "esw webpack.config.* src --color",
|
|
|
"lint:watch": "npm run lint -- --watch",
|
|
|
- "localtunnel": "lt --port 3000",
|
|
|
- "share": "npm-run-all --parallel open:src localtunnel",
|
|
|
+ "ngrok": "ngrok http 3000",
|
|
|
+ "share": "npm-run-all --parallel server dev ngrok",
|
|
|
"test": "mocha --reporter progress \"src/**/*.test.js\"",
|
|
|
"test:watch": "npm run test -- --watch",
|
|
|
"clean": "git clean -fdx -e node_modules"
|
|
@@ -141,8 +141,9 @@ TWELVE HEROES
|
|
|
* It launches the server (listening for clients connections using sockets)
|
|
|
* `npm run dev`
|
|
|
* It is launching the app for dev (not using cordova)
|
|
|
- * `npm cor-build`
|
|
|
+ * `npm run cor-build`
|
|
|
* It builds the code and prepares it for Cordova
|
|
|
+ * It will run precor-build automatically
|
|
|
* `npm run cordova`
|
|
|
* It runs the app using Cordova
|
|
|
* Today the only target is "browser" (no Apple or Android yet)
|
|
@@ -156,15 +157,16 @@ TWELVE HEROES
|
|
|
* `npm run lint:watch`
|
|
|
* It checks the code, see [above]((#3-es-lint))
|
|
|
* In addition to the command above, it checks live again the code after save
|
|
|
- * `npm run localtunnel`
|
|
|
- * It allows to share temporarily the app
|
|
|
+ * `npm run ngrok`
|
|
|
+ * It allows to share temporarily the app on public network
|
|
|
* After running `npm start` or `npm run dev`
|
|
|
* Run this and it will give a public http address
|
|
|
* If other person goes to this http address it will access the app
|
|
|
* Useful to share briefly to the other what we are doing
|
|
|
* **Use *run share* below instead**
|
|
|
* `npm run share`
|
|
|
- * It runs in parallel the dev and localtunnel
|
|
|
+ * It runs in parallel the dev, server and tunnel (ngrok)
|
|
|
+ * ngrok will provide an http address which can be used to access the app from public network
|
|
|
* `npm run test`
|
|
|
* It runs *once* all the tests : all files *.test.js
|
|
|
* Says what passed or failed
|