Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Gitpod online dev environment #198

Merged
merged 9 commits into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM gitpod/workspace-full

RUN sudo apt-get update \
&& sudo apt-get install -y \
g++ gcc make python2.7 pkg-config libx11-dev libxkbfile-dev libsecret-1-dev python-is-python3 rsync \
&& sudo rm -rf /var/lib/apt/lists/*
38 changes: 38 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
image:
file: .gitpod.Dockerfile
tasks:
- init: |
yarn
yarn build
mkdir -p lib/vscode/out
sed -i 's/The Web Worker Extension Host did not start in 10s/The Web Worker Extension Host did not start in 60s/g' ./lib/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts
sed -i 's/}, 10000);/}, 60000);/g' ./lib/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts
command: |
echo "======================="
echo "Please run 'yarn watch'"
echo "======================="
- command: |
echo "==========================================================================="
echo "Please wait for 'yarn watch' to complete compilation, then run 'yarn serve'"
echo "==========================================================================="
ports:
- port: 5000
onOpen: open-browser
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 check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: true
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: false
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: false
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ javascript: window.location.href = window.location.href.replace(/github(1s)?.com

## Development

### Cloud-based development

You can start an online development environment with [Gitpod](https://www.gitpod.io) by clicking the following button:

[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/conwnet/github1s)

### Local development

You need [these prerequisites (the same ones as for VS Code)](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for development.

```bash
Expand Down
5 changes: 4 additions & 1 deletion extensions/svelte-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.5.0",
"description": "Svelte language support for VS Code",
"scripts": {
"build:grammar": "npx js-yaml syntaxes/svelte.tmLanguage.src.yaml > syntaxes/svelte.tmLanguage.json",
"build:grammar": "js-yaml syntaxes/svelte.tmLanguage.src.yaml > syntaxes/svelte.tmLanguage.json",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As per this comment, npx requires manual input before it installs a package.

This is a problem for Gitpod prebuilds because prebuilds run in a headless environment. By adding js-yaml to the devDependencies, this problem is mitigated.

"build": "npm run build:ts && npm run build:grammar",
"vscode:prepublish": "npm run build && npm prune --production",
"compile": "npm run build:grammar",
Expand Down Expand Up @@ -119,5 +119,8 @@
}
}
]
},
"devDependencies": {
"js-yaml": "^4.0.0"
}
}