diff --git a/Home.md b/Home.md index 046ac2d..f345f1b 100644 --- a/Home.md +++ b/Home.md @@ -59,5 +59,40 @@ If this worked, it will create a "bin" directory with one executable called "loc If you install the production version of Prompt, you'll see a green sidebar, and the data for Prompt is stored in the directory ~/prompt. The development version has a red/brown sidebar and stores its data in ~/prompt-dev. This allows the production and development versions to be run simultaneously with no conflicts. If the dev database is corrupted by development bugs, or the schema changes in development it will not affect the production copy. +### One-Time Setup + +The dev version of prompt needs access to the mshell and local-server binaries that we built in the previous steps. We'll create symlinks in the prompt-client directory to the bin directories that got created earlier: + +``` +ln -s ../apishell/bin dev-bin +ln -s ../prompt-server/bin local-server-bin +``` + +Install modules (we use yarn): +``` +yarn +``` + +Electron also requires specific builds of node_modules to work (because Electron embeds a specific node.js version that might not match your development node.js version). We use a special electron command to cross-compile those modules: + +``` +scripthaus run electron-rebuild +``` + +### Running WebPack + +Two webpacks are required to run the client. One webpack will build the React code that runs inside of Electron. The other webpack builds the node.js code for the Electron App Wrapper. + +For the React code: +``` +scripthaus run webpack-watch +``` + +For the Electron App: +``` +scripthaus run webpack-electron-watch +``` + +