Skip to content

Commit

Permalink
refactor<gp>: make gitpod works with tauri (#197)
Browse files Browse the repository at this point in the history
* refactor<gp>: make gitpod works with tauri

* docs: update gitpod instruction
  • Loading branch information
kimlimjustin authored Dec 11, 2021
1 parent 9929f35 commit 1381f04
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 62 deletions.
73 changes: 34 additions & 39 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,48 @@
---
# The image is needed so that every Gitpod Workspace comes with gitpod/workspace-full-vnc whenever they start it.
image:
file: .gitpod.Dockerfile
file: Dockerfile

# Now, there are specific tasks for dependencies, servers, noVNC, ports and even pre-builds so that you start without delay.
tasks:
- name: Yarn App Server
init: echo "Starting app server"
command: |
yarn
yarn dev
- name: Yarn Docs Server
init: echo "Starting docs server"
command: |
cd docs
yarn
yarn start
- name: Yarn App Server
init: echo "Starting app server"
command: yarn && yarn dev
- name: Yarn Docs Server
init: echo "Starting docs server"
command: cd docs && yarn && yarn start

vscode:
extensions:
- kimlimjustin.jsdoc-generator

- esbenp.prettier-vscode
extensions:
- kimlimjustin.jsdoc-generator

- esbenp.prettier-vscode

- orta.vscode-jest

- orta.vscode-jest

# Ports config
ports:
- port: 3000
onOpen: open-preview
- port: 6080
onOpen: open-browser
- port: 5900
onOpen: ignore
- port: 3000
onOpen: open-preview
- port: 6080
onOpen: open-browser
- port: 5900
onOpen: ignore

# GitHub Prebuilds
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to true)
addComment: true
# add a "Review in Gitpod" button to pull requests (defaults to false)
addBadge: true
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: prebuilt-in-gitpod
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to true)
addComment: false
# add a "Review in Gitpod" button to pull requests (defaults to false)
addBadge: true
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: prebuilt-in-gitpod
15 changes: 12 additions & 3 deletions .gitpod.Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ FROM gitpod/workspace-full-vnc:latest
RUN sudo apt-get update \
# window manager
&& sudo apt-get install -y jwm \
# electron
&& sudo apt-get install -y libgtk-3-0 libnss3 libasound2 \
# native-keymap
&& sudo apt-get install -y libx11-dev libxkbfile-dev

# Tauri deps
RUN sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
libssl-dev \
libgtk-3-dev \
libappindicator3-dev \
patchelf \
librsvg2-dev
RUN sudo apt-get update \
&& sudo apt-get install -y \
libasound2-dev \
libgtk-3-dev \
libnss3-dev
libnss3-dev
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,17 @@ $ yarn install
$ yarn dev
```

---

## Contribution Guide

We highly encourage you to contribute to this project (even if you are a beginner). And if you finally want to contribute to this project, please read [our contribution guide](https://xplorer.vercel.app/community/Contributing).

---

### Gitpod for Xplorer's development

_Development in Gitpod is not functioning right now, a fix is on progress ([#174](https://github.com/kimlimjustin/xplorer/pull/174))_
The easiest way to run Xplorer in Gitpod is to use the [Gitpod](https://gitpod.io/) service, all what you need to do is to click the button below and log in with your GitHub account. Afterwards, you will see a VS Code-like environment where you can start developing and pushing your changes.

Gitpod is a Ready-to-Code environment in which you don't need to worry about dependency errors or lagging your computer. Hit the button below and log in to GitHub with your GitHub account. Then, after it loads, you end up with a VS Code-like environment where you can start developing and pushing your changes.
Please note that after starting GitPod, there're be two terminals opened. The first one is for developing Xplorer itself and the second one is for Xplorer documentation, for some reasons, the initialed command might fail, if it does, please simply run the command again (Arrow Down + Enter). To open the remote application, you can navigate to the GitPod Remote Explorer on the left side and click the globe icon on 6080 port.

**Very Important Note: Remember to reload the Gitpod website after it loads up since it won't start the servers immediately, but by reloading, you can get it started. If you are developing the app, go to the Remote Explorer on the sidebar and visit port _6080_ which opens the noVNC app server. If you are developing the docs, go to the Remote explorer but instead of port 6080, visit port _3000_. You can edit normally as you do in VS Code, but if you want to use it locally, click the hamburger menu button and click _Open in VS Code_.**
## [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#/https://github.com/kimlimjustin/xplorer)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#/https://github.com/kimlimjustin/xplorer)
## Contribution Guide

We highly encourage you to contribute to this project (even if you are a beginner). And if you finally want to contribute to this project, please read [our contribution guide](https://xplorer.vercel.app/community/Contributing).

---

Expand Down
12 changes: 4 additions & 8 deletions docs/docs/Community/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,13 @@ Great Feature Requests tend to have:

To start a local development server serving the Docusaurus docs, go into the `docs` directory and run `yarn start`

### Gitpod {#gitpod-env}
### Gitpod for Xplorer's development {#gitpod-env}

Gitpod is a Ready-to-Code environment in which you can get started immediately. Gitpod offers all dependencies pre-installed so you can just click and get started.
The easiest way to run Xplorer in Gitpod is to use the [Gitpod](https://gitpod.io/) service, all what you need to do is to click the button below and log in with your GitHub account. Afterwards, you will see a VS Code-like environment where you can start developing and pushing your changes.

To get started with Gitpod, click the button below and log in with your GitHub account.
Please note that after starting GitPod, there're be two terminals opened. The first one is for developing Xplorer itself and the second one is for Xplorer documentation, for some reasons, the initialed command might fail, if it does, please simply run the command again (Arrow Down + Enter). To open the remote application, you can navigate to the GitPod Remote Explorer on the left side and click the globe icon on 6080 port.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/kimlimjustin/xplorer)

:::note
Remember to reload the Gitpod website after it loads up since it won't start the servers immediately, but by reloading, you can get it started. If you are developing the app, go to the Remote Explorer on the sidebar and visit port _6080_ which opens the noVNC app server. If you are developing the docs, go to the Remote explorer but instead of port 6080, visit port _3000_. You can edit normally as you do in VS Code, but if you want to use it locally, clik the hamburger menu button and click _Open in VS Code_.
:::
## [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#/https://github.com/kimlimjustin/xplorer)

### Semantic commit messages {#commit-msg}

Expand Down

1 comment on commit 1381f04

@vercel
Copy link

@vercel vercel bot commented on 1381f04 Dec 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.