From a0d2a5b82a664b2b3f721b7a7196c20231583e3b Mon Sep 17 00:00:00 2001 From: Lipis Date: Tue, 19 Jan 2021 00:31:56 +0200 Subject: [PATCH] GitHub actions and some cleanup (#158) --- .github/workflows/lint.yml | 16 ++++---- .github/workflows/test.yml | 22 +++++++++++ package.json | 79 ++++++++------------------------------ 3 files changed, 45 insertions(+), 72 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf09bea..939a1e9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,9 +2,6 @@ name: Lint on: push: - branches: - - master - pull_request: jobs: lint: @@ -13,12 +10,13 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Setup Node.js 12.x + - name: Setup Node.js 14.x uses: actions/setup-node@v1 with: - node-version: 12.x + node-version: 14.x - - name: Install and lint - run: | - yarn - yarn lint + - name: Install dependencies + run: yarn + + - name: Lint + run: yarn lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..22b0dd3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: Test + +on: + push: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Setup Node.js 14.x + uses: actions/setup-node@v1 + with: + node-version: 14.x + + - name: Install dependencies + run: yarn + + - name: Test + run: yarn test diff --git a/package.json b/package.json index 8d9fabd..d4c58a1 100644 --- a/package.json +++ b/package.json @@ -1,72 +1,25 @@ { - "name": "excalidraw-room", - "version": "1.0.0", - "description": "Excalidraw collaboration server", - "main": "index.js", + "name": "excalidraw-portal", + "dependencies": { + "@types/debug": "4.1.5", + "@types/express": "4.17.11", + "@types/node": "14.14.21", + "@types/socket.io": "2.1.4", + "debug": "4.3.1", + "express": "4.17.1", + "prettier": "2.2.1", + "socket.io": "2.3.0", + "typescript": "4.1.3" + }, + "license": "MIT", + "main": "dist/index.js", "scripts": { "build": "tsc", - "fix": "yarn prettier --write", + "format": "yarn prettier --write", "lint": "yarn prettier --list-different", "prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"", "start": "node dist/index.js", "test": "yarn lint" }, - "repository": { - "type": "git", - "url": "git+https://github.com/excalidraw/excalidraw-room.git" - }, - "keywords": [], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/excalidraw/excalidraw-room/issues" - }, - "homepage": "https://github.com/excalidraw/excalidraw-room#readme", - "dependencies": { - "debug": "4.3.1", - "eslint": "7.3.1", - "eslint-config-prettier": "7.0.0", - "eslint-plugin-prettier": "3.3.1", - "express": "4.17.1", - "prettier": "2.2.1", - "socket.io": "2.3.0" - }, - "devDependencies": { - "@types/socket.io": "2.1.4", - "@types/debug": "4.1.5", - "@types/express": "4.17.11", - "@types/node": "14.14.12", - "typescript": "4.1.3" - }, - "eslintConfig": { - "extends": [ - "prettier" - ], - "plugins": [ - "prettier" - ], - "rules": { - "curly": "warn", - "no-console": [ - "warn", - { - "allow": [ - "warn", - "error", - "info" - ] - } - ], - "no-else-return": "warn", - "no-useless-return": "warn", - "prefer-const": [ - "warn", - { - "destructuring": "all" - } - ], - "prefer-template": "warn", - "prettier/prettier": "warn" - } - } + "version": "1.0.0" }