Skip to content

Commit 7aa37d8

Browse files
authored
Merge pull request #2 from jianboy/gogs1s
Gogs1s v1.0
2 parents 9b4de60 + 0b7151a commit 7aa37d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+838
-5263
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ name: Node.js CI
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [ master, gogs1s ]
76
pull_request:
8-
branches:
9-
- master
7+
branches: [ master, gogs1s ]
108

119
jobs:
1210
build:
@@ -18,11 +16,33 @@ jobs:
1816
node-version: [14.x, 15.x]
1917

2018
steps:
21-
- uses: actions/checkout@v2
22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
24-
with:
25-
node-version: ${{ matrix.node-version }}
26-
- run: yarn --frozen-lockfile
27-
- run: yarn eslint
28-
- run: yarn build
19+
- uses: actions/checkout@v2
20+
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
26+
- name: Get yarn cache directory path
27+
id: yarn-cache-dir-path
28+
run: echo "::set-output name=dir::$(yarn cache dir)"
29+
30+
- uses: actions/cache@v2
31+
with:
32+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
33+
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-yarn-${{ matrix.node-version }}
36+
37+
- name: build
38+
run: |
39+
yarn --frozen-lockfile
40+
yarn build
41+
42+
- name: artifact
43+
uses: actions/upload-artifact@v2
44+
with:
45+
name: ${{runner.OS}}-artifact
46+
path: |
47+
dist
48+
!*.map

.github/workflows/deploy.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
name: Deploy on tags
1+
# name: Deploy on tags
22

3-
on:
4-
push:
5-
tags:
6-
- v*
3+
# on:
4+
# push:
5+
# tags:
6+
# - v*
77

8-
jobs:
9-
deploy:
8+
# jobs:
9+
# deploy:
1010

11-
runs-on: ubuntu-latest
11+
# runs-on: ubuntu-latest
1212

13-
steps:
14-
- uses: actions/checkout@v2
15-
- name: Setup Node
16-
uses: actions/setup-node@v1
17-
with:
18-
node-version: '14.x'
13+
# steps:
14+
# - uses: actions/checkout@v2
15+
# - name: Setup Node
16+
# uses: actions/setup-node@v1
17+
# with:
18+
# node-version: '14.x'
1919

20-
- run: yarn --frozen-lockfile
21-
- run: yarn build
22-
- run: yarn hash
20+
# - run: yarn --frozen-lockfile
21+
# - run: yarn build
22+
# - run: yarn hash
2323

24-
- name: Deploy
25-
uses: peaceiris/actions-gh-pages@v3
26-
with:
27-
github_token: ${{ secrets.GITHUB_TOKEN }}
28-
publish_dir: ./dist
29-
cname: github1s.com
30-
keep_files: true
24+
# - name: Deploy
25+
# uses: peaceiris/actions-gh-pages@v3
26+
# with:
27+
# github_token: ${{ secrets.GITHUB_TOKEN }}
28+
# publish_dir: ./dist
29+
# cname: github1s.com
30+
# keep_files: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ lib
33
dist
44
out
55
node_modules
6+
*.tar.gz

.gitpod.Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM gitpod/workspace-full
2+
3+
RUN sudo apt-get update \
4+
&& sudo apt-get install -y \
5+
g++ gcc make python2.7 pkg-config libx11-dev libxkbfile-dev libsecret-1-dev python-is-python3 rsync \
6+
&& sudo rm -rf /var/lib/apt/lists/*

.gitpod.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
image:
2+
file: .gitpod.Dockerfile
3+
tasks:
4+
- init: |
5+
yarn
6+
yarn build
7+
command: |
8+
echo "======================="
9+
echo "Please run 'yarn watch'"
10+
echo "======================="
11+
- command: |
12+
echo "==========================================================================="
13+
echo "Please wait for 'yarn watch' to complete compilation, then run 'yarn serve'"
14+
echo "==========================================================================="
15+
ports:
16+
- port: 5000
17+
onOpen: open-browser
18+
github:
19+
prebuilds:
20+
# enable for the master/default branch (defaults to true)
21+
master: true
22+
# enable for all branches in this repo (defaults to false)
23+
branches: true
24+
# enable for pull requests coming from this repo (defaults to true)
25+
pullRequests: true
26+
# enable for pull requests coming from forks (defaults to false)
27+
pullRequestsFromForks: true
28+
# add a check to pull requests (defaults to true)
29+
addCheck: true
30+
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
31+
addComment: true
32+
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
33+
addBadge: false
34+
# add a label once the prebuild is ready to pull requests (defaults to false)
35+
addLabel: false

.husky/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
_
1+
_

README.md

Lines changed: 4 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,8 @@
1-
![GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/logo.png)
2-
# github1s
1+
![Gogs1s](resources/images/logo.png)
2+
# Gogs1s
33

4-
One second to read GitHub code with VS Code.
5-
6-
## Usage
7-
8-
Just add `1s` after `github` and press `Enter` in the browser address bar for any repository you want to read.
9-
10-
For example, try it on the VS Code repo:
11-
12-
[https://github1s.com/microsoft/vscode](https://github1s.com/microsoft/vscode)
13-
14-
![VS Code - GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/vs-code-github1s.png)
15-
16-
For browser extensions, see [Third-party Related Projects](https://github.com/conwnet/github1s#third-party-related-projects).
17-
18-
Or save the following code snippet as a bookmarklet (GitHub markdown doesn't allow js links, so just copy it into a bookmark).
19-
20-
```
21-
javascript: window.location.href = window.location.href.replace('github.com', 'github1s.com')
22-
```
23-
24-
## Documentation
25-
26-
- [How it works](https://github.com/conwnet/github1s/blob/master/docs/guide.md)
4+
VSCode web online preview code for gogs.
275

286
## Screenshots
297

30-
![VS Code - GitHub1s](https://raw.githubusercontent.com/mohitjaisal/github1s/master/resources/images/Github1sDemo1.gif)
31-
32-
![VS Code - GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/demo.png)
33-
34-
## Development
35-
36-
You need [these prerequisites (the same ones as for VS Code)](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for development.
37-
38-
```bash
39-
$ git clone [email protected]:conwnet/github1s.git
40-
$ cd github1s
41-
$ yarn
42-
$ yarn watch
43-
$ yarn serve # in another shell
44-
$ # Then visit http://localhost:5000 or http://localhost:5000/conwnet/github1s once the build is completed.
45-
```
46-
47-
## Build
48-
49-
```bash
50-
$ yarn
51-
$ yarn build
52-
```
53-
54-
## Third-party Related Projects
55-
56-
### Chrome Extensions
57-
58-
- [zulhfreelancer](https://github.com/zulhfreelancer)/[Open in VS Code](https://chrome.google.com/webstore/detail/open-in-vs-code-github1sc/neloiopjjeflfnecdlajhopdlojlkhll)
59-
60-
- [fhefh2015/GitHub1s_chrome_extension](https://github.com/fhefh2015/GitHub1s_chrome_extension) - [Chrome Web Store](https://chrome.google.com/webstore/detail/github1s/lodjfmkfbfkpdhnhkcdcoonghhghbkhe)
61-
62-
- [febaoshan/edge-extensions-github-code-viewer](https://github.com/febaoshan/edge-extensions-github-code-viewer) - [Chrome Web Store](https://chrome.google.com/webstore/detail/github-code-viewer/ecddapgifccgblebfibdgkagfbdagjfn)
63-
64-
- [Darkempire78/Github1s-Extension](https://github.com/Darkempire78/Github1s-Extension)
65-
- [zvizvi/Github Web IDE](https://github.com/zvizvi/github-web-ide) - [Chrome Web Store](https://chrome.google.com/webstore/detail/adjiklnjodbiaioggfpbpkhbfcnhgkfe)
66-
- [katsuhisa91/github1s-shortcut](https://github.com/katsuhisa91/github1s-shortcut) - [Chrome Web Store](https://chrome.google.com/webstore/detail/shortcut-to-github1s/gfcdbodapcbfckbfpmgeldfkkgjknceo)
67-
68-
### Firefox Extensions
69-
70-
- [Darkempire78/Github1s-Extension](https://github.com/Darkempire78/Github1s-Extension) - [Firefox Browser Addons](https://addons.mozilla.org/firefox/addon/github1s-extension)
71-
- [mcherifi/github1s-firefox-addon](https://github.com/mcherifi/github1s-firefox-addon) - [Firefox Browser Addons](https://addons.mozilla.org/firefox/addon/github1s/)
72-
- [zvizvi/Github Web IDE](https://github.com/zvizvi/github-web-ide) - [Firefox Browser Addons](https://addons.mozilla.org/firefox/addon/github-web-ide/)
73-
74-
75-
### Microsoft Edge Extensions
76-
77-
- [febaoshan/edge-extensions-github-code-viewer](https://github.com/febaoshan/edge-extensions-github-code-viewer)
78-
- [zvizvi/Github Web IDE](https://github.com/zvizvi/github-web-ide)
8+
![VS Code - Gogs1s](resources/images/4.gif)

deploy/apache/.htaccess

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<IfModule mod_rewrite.c>
2+
RewriteEngine On
3+
RewriteBase /
4+
RewriteRule ^index\.html$ - [L]
5+
RewriteCond %{REQUEST_FILENAME} !-f
6+
RewriteCond %{REQUEST_FILENAME} !-d
7+
RewriteRule . /index.html [L]
8+
</IfModule>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<VirtualHost 115.28.243.165>
2+
ServerAdmin [email protected]
3+
DocumentRoot "/home/twtech/www/code.git.yoqi.me"
4+
ServerName code.git.yoqi.me
5+
ServerAlias ide.git.yoqi.me
6+
php_admin_value open_basedir "/home/twtech/www/:/tmp/"
7+
8+
ErrorLog "/home/twtech/www/wwwlogs/code.git.yoqi.me_error_apache.log"
9+
#CustomLog "/home/twtech/www/wwwlogs/code.git.yoqi.me_access_apache.log" common
10+
11+
<IfModule alias_module>
12+
Alias /.well-known/acme-challenge "/home/twtech/tools/acme-tiny/challenges"
13+
<Directory /home/twtech/tools/acme-tiny/challenges>
14+
Options FollowSymLinks MultiViews
15+
AllowOverride None
16+
Order allow,deny
17+
Allow from all
18+
</Directory>
19+
</IfModule>
20+
21+
<Directory "/home/twtech/www/code.git.yoqi.me">
22+
SetOutputFilter DEFLATE
23+
Options FollowSymLinks ExecCGI
24+
#Require all granted
25+
AllowOverride All
26+
Order allow,deny
27+
Allow from all
28+
DirectoryIndex index.html index.php
29+
</Directory>
30+
#<Directory ~ ".*\.svn|.git|_svn/.*">
31+
# Order allow,deny
32+
# Deny from all
33+
#</Directory>
34+
</VirtualHost>

deploy/nginx/code.git.yoqi.me.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
loation /{
2+
try_files $uri $uri/ /index.html;
3+
}

0 commit comments

Comments
 (0)