|
| 1 | +# Using standalone to develop cables |
| 2 | + |
| 3 | +## Set Up |
| 4 | + |
| 5 | +* the preferred way of developing cables locally is using the `cables_dev` repository: https://github.com/cables-gl/cables_dev |
| 6 | +* that repo contains scripts that will set up everything for you to get started |
| 7 | +* Read up about setting up everything for you to start contributing to cables in the section on how to ["Set up local environment"](../1_setup_dev_env/setup_dev_env) |
| 8 | + of the official cables documentation. |
| 9 | + |
| 10 | +<a id="dev"></a> |
| 11 | +## Build / Dev |
| 12 | + |
| 13 | +Once the above steps are done, continue below, deciding beforehand if you want to improve your local version of cables standalone, |
| 14 | +develop on cables core or editor, or would like to build and package a finished executable. |
| 15 | + |
| 16 | +### Local Build |
| 17 | + |
| 18 | +- set up your local environment (see above) |
| 19 | +- change to `cables_electron` directory (`cd cables_electron`) |
| 20 | +- run `npm install --no-save` |
| 21 | +- run `npm run build` to build the standalone version |
| 22 | +- run `npm run start` to start the standalone from the checked out sources |
| 23 | + |
| 24 | +### Local Development |
| 25 | + |
| 26 | +- set up your local environment (see above) |
| 27 | +- change to `cables_electron` directory (`cd cables_electron`) |
| 28 | +- run `npm install --no-save` |
| 29 | +- run `npm run build` |
| 30 | +- use `npm run start` to start the app |
| 31 | + - this will start watchers for changes in client-side javascript dirs (e.g. `src_client` and `../shared/client/` |
| 32 | + - when making changes to files in these directories, a reload of the electron app is enough to see the changes (Cmd/Ctrl+R) |
| 33 | +- if you want to develop on ops and/or the ui, change to cables_dev (`cd ..`) and run `npm run watch:standalone` |
| 34 | + - this will create watchers on files in `cables` and `cables_ui` that trigger a rebuild on change |
| 35 | + - when making changes to files in these directories, a reload of the electron app is enough to see the changes (Cmd/Ctrl+R) |
| 36 | + |
| 37 | +### Building an executable |
| 38 | + |
| 39 | +- take the steps that are described in "Local Build" above |
| 40 | +- use `npm run pack` or `npm run dist` (will try to sign the exe) - add `:mac`, `:win`, `:linux` to only build one architecture |
| 41 | +- find the executable in `dist/` |
0 commit comments