From fa8c272f5b1823f14cf7b31f773dbad9aec2a6db Mon Sep 17 00:00:00 2001 From: Molunerfinn Date: Mon, 5 Mar 2018 09:12:49 +0800 Subject: [PATCH 1/4] Fixed: padding-right --- src/views/Profile.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Profile.vue b/src/views/Profile.vue index 68a90f1..881fa24 100644 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -333,7 +333,7 @@ export default { width calc(100% - 56px) word-wrap: break-word line-height: 20px - padding-left 4px + padding-right 4px &.small-text font-size 16px &-status From ab3214bcf15af2f2e1b66bc31f7d6d3ac1d55778 Mon Sep 17 00:00:00 2001 From: Molunerfinn Date: Wed, 28 Mar 2018 10:14:54 +0800 Subject: [PATCH 2/4] Added: docker support --- .dockerignore | 5 +++++ Dockerfile | 6 ++++++ README.md | 53 ++++++++++++++++++++++++++++++++++++--------------- package.json | 1 + yarn.lock | 4 ++++ 5 files changed, 54 insertions(+), 15 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..171e8a3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +.gitignore +README.md +node_modules/ +dist/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ae5e241 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM node:carbon-alpine +WORKDIR /www +COPY . /www +VOLUME ./:/www +RUN npm install +CMD npm run build && npm start diff --git a/README.md b/README.md index 9f8ab26..baee163 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ Site: https://gh-profile-summary.teamsz.xyz - Chart.js - Koa - Github graphql api -- now.sh ## Screenshot @@ -26,19 +25,7 @@ Site: https://gh-profile-summary.teamsz.xyz ![](https://user-images.githubusercontent.com/12621342/35951773-d1c9cf50-0cb7-11e8-80b2-08ae7d876533.png) -## Local run - -> You need to have node environment! - -### Install - -``` bash -git clone https://github.com/Molunerfinn/node-github-profile-summary.git -cd node-github-profile-summary -npm install # or yarn -``` - -### Setup +## Setup First generate a token at https://github.com/settings/tokens @@ -57,6 +44,20 @@ HTTPS=false **If you set `HTTPS=true`, then the websocket will connect the 443 port, it's useful for https production.** +## Local run + +### Node.js + +> You need to have node environment! + +### Install + +``` bash +git clone https://github.com/Molunerfinn/node-github-profile-summary.git +cd node-github-profile-summary +npm install # or yarn +``` + ### Run ```bash @@ -64,12 +65,34 @@ npm run build npm start ``` +**Notice:** 8888 is the `KOA_PORT` in `.env` file + +And then open the link `http://localhost:8888`, Done. + +### Docker + +> You need to have docker environment! + +### Build + +```bash +docker build -t github-profile . +``` + +### Run + +```bash +docker run -it --rm --name github-profile -p 8888:8888 github-profile +``` + +**Notice:** 8888 is the `KOA_PORT` in `.env` file + And then open the link `http://localhost:8888`, Done. ## TODOS - More useful charts -- Docker support +- ~~Docker support~~ - ... diff --git a/package.json b/package.json index e4d5751..091f555 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "chalk": "^2.0.1", "copy-webpack-plugin": "^4.0.1", "css-loader": "^0.28.0", + "dotenv": "^5.0.1", "eslint": "^4.15.0", "eslint-config-standard": "^10.2.1", "eslint-friendly-formatter": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 5cfd362..a0d3dd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2282,6 +2282,10 @@ dotenv@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d" +dotenv@^5.0.1: + version "5.0.1" + resolved "http://registry.npm.taobao.org/dotenv/download/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" + duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" From e7eb4e1b7d351f2a8d1d183be8d7c05e21de980b Mon Sep 17 00:00:00 2001 From: PiEgg Date: Sun, 25 Nov 2018 10:03:53 +0800 Subject: [PATCH 3/4] Fixed: now.sh deploy version --- now.json | 1 + 1 file changed, 1 insertion(+) diff --git a/now.json b/now.json index 4a67628..9e9da67 100644 --- a/now.json +++ b/now.json @@ -1,4 +1,5 @@ { + "version": 1, "env": { "GH_TOKEN": "@gh-summary-token", "JWT_SECRET": "@jwt-secret" From 19fccc273cc17a38d899cf321857a0d3b8f3595c Mon Sep 17 00:00:00 2001 From: VK <24637852+krynv@users.noreply.github.com> Date: Wed, 21 Aug 2019 14:06:45 +0100 Subject: [PATCH 4/4] Fixing grammar, formatting errors and typos - Fixed typos, grammatical errors and formatting. - Updated copyright year --- README.md | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index baee163..08aa888 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

-> The node version of github-profile-summary which is inspired by tipsy' [github-profile-summary](https://github.com/tipsy/github-profile-summary) +> The node version of github-profile-summary which is inspired by tipsy's [github-profile-summary](https://github.com/tipsy/github-profile-summary) Site: https://gh-profile-summary.teamsz.xyz @@ -13,7 +13,7 @@ Site: https://gh-profile-summary.teamsz.xyz - Vue - Chart.js - Koa -- Github graphql api +- GitHub GraphQL API ## Screenshot @@ -21,34 +21,34 @@ Site: https://gh-profile-summary.teamsz.xyz ![](https://user-images.githubusercontent.com/12621342/35951697-89e3338e-0cb7-11e8-9986-dc258f257b97.png) -### Share system & Save your profile as Image +### Share system & save your profile as an image ![](https://user-images.githubusercontent.com/12621342/35951773-d1c9cf50-0cb7-11e8-80b2-08ae7d876533.png) ## Setup -First generate a token at https://github.com/settings/tokens +First, generate a token over at: https://github.com/settings/tokens -Then You need to create a `.env` file in the project folder. +Then you need to create a `.env` file in the project folder. -The `.env` file looks like: +The `.env` file looks like this: ```env -GH_TOKEN=Your token here -JWT_SECRET=Any string -KOA_PORT=8888 -HTTPS=false +GH_TOKEN = Your token here +JWT_SECRET = Any string +KOA_PORT = 8888 +HTTPS = false ``` -> KOA_PORT can be any port you like which is available. +> KOA_PORT can be any available port that you like. -**If you set `HTTPS=true`, then the websocket will connect the 443 port, it's useful for https production.** +**If you set `HTTPS = true`, then the websocket will connect via port 443. This is particularly useful for https production.** ## Local run ### Node.js -> You need to have node environment! +> You need to have a node environment! ### Install @@ -65,13 +65,15 @@ npm run build npm start ``` -**Notice:** 8888 is the `KOA_PORT` in `.env` file +**Notice:** `8888` is the `KOA_PORT` in the `.env` file. -And then open the link `http://localhost:8888`, Done. +Access the application via: http://localhost:8888 + +Done. ### Docker -> You need to have docker environment! +> You need to have a docker environment! ### Build @@ -85,9 +87,11 @@ docker build -t github-profile . docker run -it --rm --name github-profile -p 8888:8888 github-profile ``` -**Notice:** 8888 is the `KOA_PORT` in `.env` file +**Notice:** `8888` is the `KOA_PORT` in the `.env` file. + +Access the application via: http://localhost:8888 -And then open the link `http://localhost:8888`, Done. +Done. ## TODOS @@ -100,6 +104,4 @@ And then open the link `http://localhost:8888`, Done. [MIT](http://opensource.org/licenses/MIT) -Copyright (c) 2018 Molunerfinn - - +Copyright (c) 2019 Molunerfinn