Running
Frontend
To run OpenCircuits locally (after installing), simply run
yarn start
And choose which application to run, (generally this would be digital
)
The building process may take a few seconds but then your browser should open and any local changes you make to the code will automatically persist!
Backend
While generally unnecessary unless you are working on an issue that involves backend communication, to run the backend locally - simply run
yarn build
And select server
.
And then perform a
yarn start
And choose server
and it should start!
warning
IF YOU RUN INTO exec: "gcc": executable file not found in %PATH%
ON WINDOWS
CLICK HERE
Testing
To test OpenCircuits locally, simply run
yarn test
To view the coverage of all tests, run
yarn coverage
Playwright Testing
Before running any Playwright tests, be sure to install the browser engines using
npx install playwright
Then use the command
yarn test-e2e:digital
yarn test-e2e:landing
to run playwright tests for digital or landing respectively.
For more details on working with Playwright tests in OpenCircuits, click here
Documentation
To run this documentation site locally, simply run
yarn docs
If you get the error TypeError: Cannot read property 'latest' of undefined
then run the command again.
To generate the documentation from jsdocs, run
yarn build:jsdocs
You can even run that command while yarn docs
is open in another window!
Linting
To lint locally, simply run
yarn lint
Convenientally, eslint supports automatically fixing some issues. To do this, run
yarn lint:fix