diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/getting-started.md | 4 | ||||
-rw-r--r-- | docs/dev/webpack.md | 9 | ||||
-rw-r--r-- | docs/setup/manual-setup.md | 8 |
3 files changed, 14 insertions, 7 deletions
diff --git a/docs/dev/getting-started.md b/docs/dev/getting-started.md index 07524971..9a35b71a 100644 --- a/docs/dev/getting-started.md +++ b/docs/dev/getting-started.md @@ -18,7 +18,7 @@ Developer Notes Now that everything is in place, we can start CodiMD: -4. `npm run build` will build the frontend bundle. It uses webpack to do that. +4. `yarn run build` will build the frontend bundle. It uses webpack to do that. 5. Run the server with `node app.js` @@ -32,7 +32,7 @@ rebuild the frontend or restart the server if necessary. The commands will stay active in your terminal, so you will need multiple tabs to run both at the same time. -4. Use `npm run dev` if you want webpack to continuously rebuild the frontend +4. Use `yarn run dev` if you want webpack to continuously rebuild the frontend code. 5. To auto-reload the server, the easiest method is to install [nodemon](https://www.npmjs.com/package/nodemon) and run `nodemon --watch app.js --watch lib --watch locales app.js`. diff --git a/docs/dev/webpack.md b/docs/dev/webpack.md index b05fd1d3..3d35b28a 100644 --- a/docs/dev/webpack.md +++ b/docs/dev/webpack.md @@ -7,7 +7,14 @@ about it on [the webpack website](https://webpack.js.org/). Here's how we're using it: ## `webpack.common.js` -This file contains all common definition for chunks and plugins, that are needed by the whole app. +This file contains all common definitions for chunks and plugins that are needed by the whole app. + +The various entrypoints under the `entry` key define groups of files (npm packages or .css/.js files directly from this project) that need to be included together to be useful. +The `index` group for example bundles all javascript files and libraries used for the note editor. + +Entrypoints are referenced in the `plugins` section. +The `HtmlWebpackPlugin` uses templates in `public/views/includes` to include the path to the generated resources in new templates under `public/views/build`. These templates are then used by the backend to serve HTML to the browser. + **TODO:** Document which entry points are used for what. diff --git a/docs/setup/manual-setup.md b/docs/setup/manual-setup.md index e15e624a..e13a6f12 100644 --- a/docs/setup/manual-setup.md +++ b/docs/setup/manual-setup.md @@ -18,10 +18,10 @@ Manual Installation 3. Enter the directory and type `bin/setup`, which will install npm dependencies and create configs. 4. Setup the configs, see more below 5. Setup environment variables which will overwrite the configs -6. Build front-end bundle by `npm run build` (use `npm run dev` if you are in development) +6. Build front-end bundle by `yarn run build` (use `yarn run dev` if you are in development) 7. Modify the file named `.sequelizerc`, change the value of the variable `url` with your db connection string For example: `postgres://username:password@localhost:5432/codimd` -8. It is recommended to start your server manually once: `npm start --production`, this way it's easier to see warnings or errors that might occur (leave out `--production` for development). +8. It is recommended to start your server manually once: `yarn start --production`, this way it's easier to see warnings or errors that might occur (leave out `--production` for development). 9. Run the server as you like (node, forever, pm2, SystemD, Init-Scripts) @@ -34,6 +34,6 @@ If you are upgrading CodiMD from an older version, follow these steps: 3. Fully stop your old CodiMD server. 4. `git pull` or unzip a new release in the directory. 5. Run `bin/setup`. This will take care of installing dependencies. It is safe to run on an existing installation. -6. Build front-end bundle by `npm run build` (use `npm run dev` if you are in development). -7. It is recommended to start your server manually once: `npm start --production`, this way it's easier to see warnings or errors that might occur (leave out `--production` for development). +6. Build front-end bundle by `yarn run build` (use `yarn run dev` if you are in development). +7. It is recommended to start your server manually once: `yarn start --production`, this way it's easier to see warnings or errors that might occur (leave out `--production` for development). 8. You can now restart the CodiMD server! |