Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Windows execution and build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
schlenger authored Aug 14, 2021
1 parent d7a934c commit 12f26de
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 14 deletions.
16 changes: 8 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module.exports = {
parser: '@typescript-eslint/parser',
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
sourceType: "module",
},
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended'
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off'
}
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
},
};
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ Example ported from [slate-collaborative](https://github.com/cudr/slate-collabor

# Usage

Open 2 terminal and execute the following commands:
## Setup

Clone this repository and run `npm install` as usual.

## Execution

Open two terminals and execute the following commands:

### Terminal 1 (Server)

Expand All @@ -22,6 +28,15 @@ npm run start:server
npm run start:cra
```

## Build

To build the application, run `npm run build`.

### Known issues

If you directly see some line break errors by prettier, make sure to handle your line ending correctly (on Windows).
Set the configuration of git and your local editor (e.g. (VS Code)[https://medium.com/@csmunuku/windows-and-linux-eol-sequence-configure-vs-code-and-git-37be98ef71df#:~:text=VS%20Code%20%3D%3E%20Settings%20%3D%3E,new%20files%20that%20you%20create.]) correctly.

# What about scaling, persistence etc. ?

Take a look at the [y-websocket readme](https://github.com/yjs/y-websocket)
42 changes: 39 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"start:cra": "cross-env REACT_APP_BUILD_TARGET=src/website && react-scripts start",
"start:server": "cross-env HOST=localhost PORT=1234 && npx y-websocket-server",
"prebuild": "cp -f ./tsconfig.production.json ./tsconfig.json",
"prebuild": "shx cp -f ./tsconfig.production.json ./tsconfig.json",
"build": "cross-env NODE_ENV=production && react-scripts build",
"dev": "concurrently \"yarn start:cra\" \"yarn serve\"",
"serve": "nodemon --watch ../backend/lib --inspect server.js"
Expand Down Expand Up @@ -63,6 +63,7 @@
"@types/ws": "7.2.7",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-prettier": "^3.3.1",
"prettier": "^2.2.1"
"prettier": "^2.2.1",
"shx": "^0.3.3"
}
}

0 comments on commit 12f26de

Please sign in to comment.