Update readme with new js directory

This commit is contained in:
Kaspar Emanuel 2021-08-17 11:29:18 +01:00
parent caa6284e7d
commit c835bf3b7e

View file

@ -83,10 +83,10 @@ To set up a development version of the software (most likely using emulated came
* `curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -` * `curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -`
* `sudo apt install nodejs` * `sudo apt install nodejs`
* To build the web application (this produces a set of static files, that are served by the Flask webserver) * To build the web application (this produces a set of static files, that are served by the Flask webserver)
* `cd openflexure_microscope/api/static` * `cd js`
* `npm install` * `npm install`
* `npm run build` * `npm run build`
* To create a Node.js development server (this will help various development tools to display more information, and auto-rebuilds when you change the source files) * To create a Node.js development server (this will help various development tools to display more information, and auto-rebuilds when you change the source files)
* `npm run serve` * `npm run serve`
* You access the development server on a different port (it's printed on the command line when you run the above command). This means that when it starts up you will need to tell it where the microscope server is, using the "override API origin" field in the page that pops up. If you are running a test server on your computer, this is most likely `http://localhost:5000/`. * You access the development server on a different port (it's printed on the command line when you run the above command). This means that when it starts up you will need to tell it where the microscope server is, using the "override API origin" field in the page that pops up. If you are running a test server on your computer, this is most likely `http://localhost:5000/`.
@ -97,25 +97,25 @@ All of the commands below assume that you are running in the OFM virtual environ
* To auto-format the Python code run `poe format` * To auto-format the Python code run `poe format`
* To auto-format the Javascript code, run * To auto-format the Javascript code, run
* `cd openflexure_microscope/api/static` * `cd js`
* `npm run lint` * `npm run lint`
**Before submitting a merge request/merging** please auto-format your code and also run the quality checks (linting, static analysis, and unit tests) **Before submitting a merge request/merging** please auto-format your code and also run the quality checks (linting, static analysis, and unit tests)
* To auto-format and type-check the Python code run `poe check` * To auto-format and type-check the Python code run `poe check`
* To auto-format the Javascript code, run * To auto-format the Javascript code, run
* `cd openflexure_microscope/api/static` * `cd js`
* `npm run lint` * `npm run lint`
### Details ### Details
We use several code analysis and formatting libraries in this project. **Please run all of these before submitting a merge request.** We use several code analysis and formatting libraries in this project. **Please run all of these before submitting a merge request.**
Our CI will check each of these automatically, so ensuring they pass locally will save you time. Our CI will check each of these automatically, so ensuring they pass locally will save you time.
* **Black** - Code formatting with minimal configuration. * **Black** - Code formatting with minimal configuration.
* While sometimes it's not perfect, its fine 90% of the time and prevents arguments about formatting. * While sometimes it's not perfect, its fine 90% of the time and prevents arguments about formatting.
* Automatically formats your code * Automatically formats your code
* This will rewrite your files in-place, so if you want to be able to revert, make a backup first! * This will rewrite your files in-place, so if you want to be able to revert, make a backup first!
* `poe black` * `poe black`