Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Commit

Permalink
Convert Che-Theia factory extension to plugin
Browse files Browse the repository at this point in the history
eclipse-che/che#11249

Signed-off-by: Sun Tan <sutan@redhat.com>
  • Loading branch information
sunix committed Oct 21, 2018
1 parent 6f37e98 commit c79e0d5
Show file tree
Hide file tree
Showing 17 changed files with 2,166 additions and 551 deletions.
38 changes: 15 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,39 @@
sudo: required
language: node_js
node_js: '8'
node_js: '9'
git:
depth: 1
cache:
yarn: true
directories:
- che-theia-factory/node_modules
- node_modules
branches:
only:
- master
- /.*/
env:
global:
- NODE_OPTIONS="--max_old_space_size=4096"
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
- curl -o- -L https://yarnpkg.com/install.sh | bash -s --
- export PATH=$HOME/.yarn/bin:$PATH ;
install: yarn install
script: skip
install: yarn
script: yarn build
jobs:
fast_finish: true
include:
- stage: deploy
os: linux
before_deploy:
- printf "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}\n" >> ~/.npmrc
-
deploy: # WIP env variable is set only in the https://travis-ci.org/theia-demo-plugins/che-theia-factory-extension jobs
- npm version -no-git-tag-version "0.0.1-$(date +%s)"
deploy:
- provider: script
script: echo "deploying master @eclipse-che" && cd che-theia-factory && npm version -no-git-tag-version "0.0.1-$(date +%s)" && npm publish --access public
script: npm publish --access public
on:
all_branches: true
condition: "! -v WIP && ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} == 'master'"
branch: master
skip_cleanup: true
- provider: script
script: echo "deploying all branches @wip-theia" && cd che-theia-factory && find -name "*.*" -type f -exec sed -i 's/\@eclipse-che\/theia-factory-extension/\@wiptheia\/theia-factory-extension/g' {} \; && npm version -no-git-tag-version "0.0.1-${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}-$(date +%s)" && npm publish --access public
on:
all_branches: true
condition: -v WIP
- provider: releases
api-key: $GITHUB_AUTH_TOKEN
name: backend-plugin-$(date +'%F-%T')
file_glob: true
file: ./*.theia
skip_cleanup: true
- provider: script
script: cd che-theia-factory && npm version -no-git-tag-version && npm publish --access public
on:
tags: true
skip_cleanup: true
branch: master
57 changes: 3 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Che Theia factory
This Theia extension is performing additional actions while creating/starting a Che workspace through a factory URL.
This Theia plug-in is performing additional actions while creating/starting a Che workspace through a factory URL.
Provides basic factory client side clone feature

- retrieving the factory-id from the URL
Expand All @@ -12,7 +12,7 @@ From the factory definition:
- executing post loading actions such as running CHE commands/tasks or openning a specific file.

## Testing this extension
### Setting up
### Setting up [deprecated: https://github.com/eclipse/che/issues/11632]
1. Clone [eclipse/che](git@github.com:eclipse/che.git).
```
$ git clone https://github.com/eclipse/che.git
Expand Down Expand Up @@ -191,7 +191,7 @@ Change and restart CHE if it wasn't.
}
}
```
### Test the factory extension
### Test the factory extension. [deprecated: See https://github.com/eclipse/che/issues/11632]

When opening the previous factory we expect that it would:

Expand All @@ -201,54 +201,3 @@ When opening the previous factory we expect that it would:
4. Configure few commands to build and run
5. Run the command (task) that build and run another Theia instance with the cloned factory project. The user should see the output of the command.
6. Be able to access to the "under development" Theia application. Through the preview URL.

## Getting started

Install [nvm](https://github.com/creationix/nvm#install-script).

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash

Install npm and node.

nvm install 8
nvm use 8

Install yarn.

npm install -g yarn

## Running the browser example

yarn rebuild:browser
cd browser-app
yarn start

Open http://localhost:3000 in the browser.

## Developing with the browser example

Start watching of the extension.

cd che-theia-factory-frontend-extension
yarn watch

Start watching of the browser example.

yarn rebuild:browser
cd browser-app
yarn watch

Launch `Start Browser Backend` configuration from VS code.

Open http://localhost:3000 in the browser.


## Publishing extension

Create a npm user and login to the npm registry, [more on npm publishing](https://docs.npmjs.com/getting-started/publishing-npm-packages).

npm login

Publish packages with lerna to update versions properly across local packages, [more on publishing with lerna](https://github.com/lerna/lerna#publish).

npx lerna publish
33 changes: 0 additions & 33 deletions browser-app/package.json

This file was deleted.

34 changes: 0 additions & 34 deletions che-theia-factory/package.json

This file was deleted.

21 changes: 0 additions & 21 deletions che-theia-factory/src/browser/che-theia-factory-frontend-module.ts

This file was deleted.

92 changes: 0 additions & 92 deletions che-theia-factory/src/browser/factory-manager.ts

This file was deleted.

Loading

0 comments on commit c79e0d5

Please sign in to comment.