Skip to content

Instantly share code, notes, and snippets.

@sunix
Last active December 21, 2020 11:00
Show Gist options
  • Save sunix/ae029464d456257b64de33e12306d1db to your computer and use it in GitHub Desktop.
Save sunix/ae029464d456257b64de33e12306d1db to your computer and use it in GitHub Desktop.
dev asciidoc extension in che
# A devfile to develop VS Code extensions.
# For developers who would like to create his plugin inside Che-Theia.
apiVersion: 1.0.0
metadata:
generateName: vscode-asciidoc-ext-in-che-
projects:
- name: asciidoctor-vscode
source:
type: git
location: 'https://github.com/asciidoctor/asciidoctor-vscode'
- name: asciidoctor-che
source:
location: 'https://github.com/sunix/asciidoctor-che'
type: git
branch: master
components:
- type: chePlugin
id: joaompinto/asciidoctor-vscode/latest
registryUrl: 'https://sunix-che-plugin-registry-dev-asciidoc.surge.sh/v3/'
alias: asciidoc-sidecar
env:
- name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE
value: 'tail -f /dev/null'
- id: eclipse/che-theia/next
type: cheEditor
alias: che-theia
env:
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
- alias: che-dev
type: dockerimage
image: quay.io/eclipse/che-theia-dev:next
mountSources: true
endpoints:
- name: "theia-dev-flow"
port: 3010
attributes:
protocol: http
public: 'true'
memoryLimit: "3Gi"
- id: redhat/vscode-yaml/latest
type: chePlugin
- id: che-incubator/typescript/latest
type: chePlugin
memoryLimit: 2048M
commands:
- name: 1. package ... asciidoc extension
actions:
- workdir: /projects/asciidoctor-vscode
type: exec
command: |
npm install; yes | vsce package; echo -e "\e[32mDone.\e[0m Packaging complete"
component: che-dev
- name: 2. run ... HOSTED che-theia + detect remote vscode ext
actions:
- workdir: /home/theia
type: exec
command: |
export THEIA_PLUGIN_ENDPOINT_DISCOVERY_PORT='2504' && \
node src-gen/backend/main.js \
/projects \
--hostname=0.0.0.0 \
--port=3130
component: che-theia
- name: 3. run ... asciidoc extension from sidecar
actions:
- workdir: /home/theia/
type: exec
command: |
export THEIA_PLUGIN_ENDPOINT_DISCOVERY_PORT='2504' && export THEIA_PLUGINS='local-dir:///projects/asciidoctor-vscode' && export THEIA_PLUGIN_ENDPOINT_PORT='10000' && /remote-endpoint/plugin-remote-endpoint
component: asciidoc-sidecar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment