From edf301cfa320cce48eaf055a57f416bc1aa6ee1e Mon Sep 17 00:00:00 2001 From: Claudius Date: Sun, 31 Mar 2019 16:02:05 +0200 Subject: splitting README.md into files in /docs for better readability Signed-off-by: Claudius --- docs/dev/getting-started.md | 16 ++++++++++++++++ docs/dev/ot.md | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 docs/dev/getting-started.md create mode 100644 docs/dev/ot.md (limited to 'docs/dev') diff --git a/docs/dev/getting-started.md b/docs/dev/getting-started.md new file mode 100644 index 00000000..6eb1b136 --- /dev/null +++ b/docs/dev/getting-started.md @@ -0,0 +1,16 @@ +# Developer Notes + +## Structure + +```text +codimd/ +├── test/ --- test suite +├── docs/ --- documentation +├── lib/ --- server libraries +└── public/ --- client files + ├── css/ --- css styles + ├── docs/ --- default documents + ├── js/ --- js scripts + ├── vendor/ --- vendor includes + └── views/ --- view templates +``` diff --git a/docs/dev/ot.md b/docs/dev/ot.md new file mode 100644 index 00000000..71f7f78d --- /dev/null +++ b/docs/dev/ot.md @@ -0,0 +1,6 @@ +## Operational Transformation + +From 0.3.2, we started supporting operational transformation. +It makes concurrent editing safe and will not break up other users' operations. +Additionally, now can show other clients' selections. +See more at [http://operational-transformation.github.io/](http://operational-transformation.github.io/) -- cgit v1.2.3 From 74fdd26ea057dab77e761614497d69d2c90a66d7 Mon Sep 17 00:00:00 2001 From: Claudius Date: Sun, 31 Mar 2019 18:57:26 +0200 Subject: integrating information from the old wiki Signed-off-by: Claudius --- docs/dev/getting-started.md | 49 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) (limited to 'docs/dev') diff --git a/docs/dev/getting-started.md b/docs/dev/getting-started.md index 6eb1b136..79a97d4a 100644 --- a/docs/dev/getting-started.md +++ b/docs/dev/getting-started.md @@ -1,13 +1,54 @@ # Developer Notes +## Preparing for running the code + +**Notice:** *If you're into [docker](../setup/docker.md) or [heroku](../setup/heroku.md), +there's extra documents for those!* + +1. Clone the repository (Cloning is the preferred way, but you can also download + and unzip a release) +2. Enter the directory and run `bin/setup`, which will install npm dependencies + and create configs. The setup script is written in Bash, you would need bash + as a prerequisite. +3. Setup the [config file](../configuration-config-file.md) or set up + [environment variables](../configuration-env-vars.md). + + +## Running the Code + +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. +5. Run the server with `node app.js` + + +## Running the Code with Auto-Reload + +The commands above are fine for production, but you're a developer and surely +you want to change things. You would need to restart both commands whenever you +change something. Luckily, you can run these commands that will automatically +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 + 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`. + + ## Structure +The repository contains two parts: a server (backend) and a client (frontend). +most of the server code is in `/lib` and most of the client code is in `public`. + ```text -codimd/ -├── test/ --- test suite +codimd-server/ ├── docs/ --- documentation -├── lib/ --- server libraries -└── public/ --- client files +├── lib/ --- server code +├── test/ --- test suite +└── public/ --- client code ├── css/ --- css styles ├── docs/ --- default documents ├── js/ --- js scripts -- cgit v1.2.3 From 54edec89000aec94cae325be3d5c85442ac21adf Mon Sep 17 00:00:00 2001 From: Claudius Date: Sun, 31 Mar 2019 20:10:32 +0200 Subject: striving for consistency across various docs Signed-off-by: Claudius --- docs/dev/getting-started.md | 10 +++++----- docs/dev/ot.md | 12 ++++++++++-- docs/dev/webpack.md | 9 ++++++++- 3 files changed, 23 insertions(+), 8 deletions(-) (limited to 'docs/dev') diff --git a/docs/dev/getting-started.md b/docs/dev/getting-started.md index 79a97d4a..07524971 100644 --- a/docs/dev/getting-started.md +++ b/docs/dev/getting-started.md @@ -1,12 +1,12 @@ -# Developer Notes +Developer Notes +=== ## Preparing for running the code -**Notice:** *If you're into [docker](../setup/docker.md) or [heroku](../setup/heroku.md), -there's extra documents for those!* +**Notice:** *There's [specialised instructions for docker](../setup/docker.md) or [heroku](../setup/heroku.md), if you prefer running code this way!* -1. Clone the repository (Cloning is the preferred way, but you can also download - and unzip a release) +1. Clone the repository with `git clone https://github.com/codimd/server.git codimd-server` + (cloning is the preferred way, but you can also download and unzip a release) 2. Enter the directory and run `bin/setup`, which will install npm dependencies and create configs. The setup script is written in Bash, you would need bash as a prerequisite. diff --git a/docs/dev/ot.md b/docs/dev/ot.md index 71f7f78d..924be693 100644 --- a/docs/dev/ot.md +++ b/docs/dev/ot.md @@ -1,6 +1,14 @@ -## Operational Transformation +Operational Transformation +=== From 0.3.2, we started supporting operational transformation. It makes concurrent editing safe and will not break up other users' operations. Additionally, now can show other clients' selections. -See more at [http://operational-transformation.github.io/](http://operational-transformation.github.io/) + +See more at [https://operational-transformation.github.io/](https://operational-transformation.github.io/) + +And even more in this 2010 article series: + +* https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs_21.html +* https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs_22.html +* https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs.html diff --git a/docs/dev/webpack.md b/docs/dev/webpack.md index 7b391f3a..b05fd1d3 100644 --- a/docs/dev/webpack.md +++ b/docs/dev/webpack.md @@ -1,4 +1,11 @@ -# Webpack Docs +Webpack +=== + +Webpack is a JavaScript build system for frontend code. You can find out all +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. -- cgit v1.2.3