Skip to content

Commit e0a41e8

Browse files
vitaliy-guliyl0rd
andauthored
Add devfile (#2)
* Add the devfile * Add CONTRIBUTING.md file --------- Signed-off-by: vitaliy-guliy <[email protected]> Co-authored-by: Mario Loriedo <[email protected]>
1 parent 550f5ba commit e0a41e8

File tree

4 files changed

+1205
-44
lines changed

4 files changed

+1205
-44
lines changed

CONTRIBUTING.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Contribute to VS Code Devfile extension
2+
================
3+
4+
### Step 1 : Open this repository in an Eclipse Che cloud development environment
5+
6+
Use this GitHub repository URL in Eclipse Che Dashboard or in a direct link `https://<che-hostname>/#https://github.com/vitaliy-guliy/vscode-devfile/`.
7+
8+
Click on the link below to open it in Red Hat Developer Sandbox:
9+
10+
[![Contribute](https://img.shields.io/static/v1?label=Open%20in%20Red%20Hat%20Developer%20Sandbox...&message=Free%20as%20free%20🍺%20and%20free%20💬..&logo=eclipseche&color=FDB940&labelColor=525C86)](https://workspaces.openshift.com#https://github.com/vitaliy-guliy/vscode-devfile/)
11+
12+
### Step 2 : Compile extension
13+
14+
The first you need to install node dependencies by running the task `devfile: Install dependencies`.
15+
The task progress will be shown in VS Code Terminal output.
16+
17+
Once dependencies have been installed, compile the extension with task `devfile: Compile`.
18+
It will create an `out` directory containing the compiled extension.
19+
20+
### Step 3 : Run the extension in separte VS Code instance
21+
22+
Now you can test the extension in a separate VS Code instance.
23+
24+
> Note that it is not possible to launch the extension until you compile it as described in step 2.
25+
26+
To run a separate VS Code instance focus the editor or the `Explorer`, press `F5`. After a few seconds VS Code starts a separate instance in a new browser tab.
27+
28+
In the new VS Code instance a `Welcome` tab is opened with a link to the `Get Started with Devfile` VS Code Walkthrough.
29+
If the VS Code Walkthrough link is not there try expanding the Walkthroughs by clicking `More...` on the right.
30+
31+
### Step 4 : Build `vsix` binary
32+
33+
Run task `devfile: Build vsix binary` to build the extension binary.
34+
35+
In a terminal you may be warned with a message below:
36+
37+
> **WARNING** Using '*' activation is usually a bad idea as it impacts performance.
38+
39+
Just type `y` to the terminal and press `Enter` to confirm the build.
40+
41+
When build finished, a new file `redhat-vscode-devfile-0.0.1.vsix` will appear in the project root.
42+
43+
The file can be downloaded and used in other local or remote VS Code instances.
44+
45+
> Installing a vsix binary in VS Code is easy: drag and drop the file into the `Extensions` view.

devfile.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
schemaVersion: 2.2.0
2+
metadata:
3+
name: vscode-devfile
4+
components:
5+
- name: tools
6+
container:
7+
image: quay.io/devfile/universal-developer-image:ubi8-latest
8+
memoryRequest: 1G
9+
memoryLimit: 4G
10+
cpuRequest: '1'
11+
cpuLimit: '2'
12+
13+
commands:
14+
- id: install-dependencies
15+
exec:
16+
label: "Install dependencies"
17+
component: tools
18+
commandLine: "npm install"
19+
20+
- id: compile
21+
exec:
22+
label: "Compile"
23+
component: tools
24+
commandLine: "npm run compile"
25+
group:
26+
kind: build
27+
isDefault: true
28+
29+
- id: build-vsix
30+
exec:
31+
label: "Build vsix binary"
32+
component: tools
33+
commandLine: "npm run build-vsix"
34+
group:
35+
kind: build
36+
isDefault: false

0 commit comments

Comments
 (0)