diff options
author | LawnCable <git@lawncable.net> | 2021-02-28 17:38:53 +0100 |
---|---|---|
committer | LawnCable <git@lawncable.net> | 2021-02-28 18:15:50 +0100 |
commit | 47061ed7a78bf19645c29732bd91f1c03f86a618 (patch) | |
tree | 9e93bff7901ec6af4390068a3db320c2a069e67f | |
parent | 850004de5d6110bfb36e04b17f00bb1685623cf8 (diff) | |
download | electron-47061ed7a78bf19645c29732bd91f1c03f86a618.tar.gz electron-47061ed7a78bf19645c29732bd91f1c03f86a618.tar.bz2 electron-47061ed7a78bf19645c29732bd91f1c03f86a618.tar.xz electron-47061ed7a78bf19645c29732bd91f1c03f86a618.zip |
add prettier code formatting
-rw-r--r-- | .gitlab-ci.yml | 6 | ||||
-rw-r--r-- | Readme.md | 4 | ||||
-rw-r--r-- | package-lock.json | 19 | ||||
-rw-r--r-- | package.json | 7 |
4 files changed, 24 insertions, 12 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 787d052..25fd7f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ cache: stages: - prepare + - test - build - package @@ -15,6 +16,11 @@ npmi: script: - npm install +test_formatting: + stage: test + script: + - npm run formatting:check + build: stage: build script: @@ -15,6 +15,10 @@ npm start Info: you need `wine` to cross build from linux for windows (https://www.electron.build/multi-platform-build#linux) +## Contribution Guidelines + +- We use prettier for code formatting, please run `npm run formatting:check` and `npm run formatting:fix` before commiting. + ## Implemented Features - A server selection that contains the socialLinks of the server and a short description diff --git a/package-lock.json b/package-lock.json index 7f4bc8c..f7281ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mana-launcher", - "version": "1.0.2", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -701,15 +701,15 @@ "resolved": "https://registry.npmjs.org/discord-rich-presence/-/discord-rich-presence-0.0.8.tgz", "integrity": "sha512-IpVMPjv15C9UvppxvrrGdv6bzQHOW1P1vLoMH15HvdJwGJ3dBd2bnrJ63Uy36YRUfrAMxGLiwUDHncvC8AuPaQ==", "requires": { - "discord-rpc": "github:discordjs/rpc#60ddddc38d2bd3ffe6df91e518ac7974239562b5" + "discord-rpc": "github:discordjs/rpc" }, "dependencies": { "discord-rpc": { "version": "github:discordjs/rpc#60ddddc38d2bd3ffe6df91e518ac7974239562b5", "from": "github:discordjs/rpc", "requires": { - "node-fetch": "^2.3.0", - "ws": "^6.1.1" + "node-fetch": "2.6.0", + "ws": "7.1.2" } }, "ws": { @@ -1662,12 +1662,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -1985,6 +1979,11 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, + "prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==" + }, "pretty-bytes": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", diff --git a/package.json b/package.json index d54aa1b..8c6b2cc 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,12 @@ "description": "A launcher for manaplus.", "main": "dist/main.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "npm run formatting:check", "build": "tsc", "start": "npm run build && electron .", - "package": "npm run build && electron-builder build -wl" + "package": "npm run build && electron-builder build -wl", + "formatting:check": "prettier \"*.(json|md)\" src/ --check", + "formatting:fix": "prettier \"*.(json|md)\" src/ --write" }, "postinstall": "electron-builder install-app-deps", "author": "LawnCable", @@ -34,6 +36,7 @@ "discord-rpc": "^3.0.1", "extract-zip": "^1.6.6", "fs-extra": "^6.0.1", + "prettier": "^2.2.1", "register-scheme": "github:devsnek/node-register-scheme", "request": "^2.87.0", "request-progress": "^3.0.0", |