Skip to content

Commit

Permalink
Support external url with imjoy-core 0.12.7 (#356)
Browse files Browse the repository at this point in the history
* Support install plugins from external url

* Fix jailed asset url

* Bump version to 0.10.53

* Remove copying imjoy-core files

* Fix lint
  • Loading branch information
oeway authored May 5, 2020
1 parent e700f5d commit b08b7fb
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
12 changes: 12 additions & 0 deletions repo/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ const _backends = {
lang: "web-python",
icon: "🐍",
},
"rpc-window": {
type: "external",
name: "RPC Window",
lang: "*",
icon: "🌟",
},
"rpc-worker": {
type: "external",
name: "RPC Worker",
lang: "*",
icon: "⚙️",
},
collection: {
type: "-",
name: "Collection",
Expand Down
22 changes: 18 additions & 4 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "imjoy",
"version": "0.10.52",
"version": "0.10.53",
"private": false,
"description": "ImJoy -- deep learning made easy.",
"author": "imjoy-team <[email protected]>",
Expand Down Expand Up @@ -33,7 +33,7 @@
"axios": "^0.18.1",
"dompurify": "^2.0.8",
"file-saver": "^1.3.3",
"imjoy-core": "0.12.6",
"imjoy-core": "0.12.7",
"js-yaml": "^3.13.1",
"lodash": "^4.17.15",
"marked": "^0.8.0",
Expand Down Expand Up @@ -78,6 +78,7 @@
"eslint-plugin-vue": "^5.0.0-0",
"gh-pages": "^2.0.1",
"husky": "^4.2.3",
"imjoy-rpc": "^0.1.12",
"lint-staged": "^10.0.8",
"mocha": "^5.0.5",
"mocha-webpack": "^2.0.0-beta.0",
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/Imjoy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,6 @@
draggable=".drag-handle"
:scrollable="true"
>
<p v-if="!selected_dialog_window">No dialog window available to show</p>
<template v-for="wdialog in dialogWindows">
<window
:key="wdialog.id"
Expand Down Expand Up @@ -3061,7 +3060,6 @@ export default {
},
showDialog(_plugin, config) {
config.dialog = true;
config.type = config.type || "imjoy/joy";
return new Promise((resolve, reject) => {
const _selectedWindow = this.wm.selected_window;
this.pm
Expand Down
10 changes: 0 additions & 10 deletions web/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const nojekyll_file = {
content: ""
};

const isDevServer = process.env.WEBPACK_DEV_SERVER;

module.exports = {
runtimeCompiler: true,
outputDir: './dist',
Expand Down Expand Up @@ -68,12 +66,6 @@ module.exports = {
from: path.join(__dirname, "src/pluginParser.js"),
to: path.join(__dirname, "dist/static/js/pluginParser.js"),
toType: "file",
},{
from: path.join(__dirname, "node_modules/imjoy-core/src/base_frame.html"),
to: path.join(__dirname, "dist/base_frame.html"),
toType: "file",
// only copy base_frame if when dev server is on
test: isDevServer? /base_frame\.html$/: /no_base_frame\.html$/
}]),
new MonacoWebpackPlugin({output: 'static/vs', languages: ['javascript', 'html', 'css', 'python'], features: ['accessibilityHelp', 'bracketMatching', 'caretOperations', 'clipboard', 'codeAction', 'codelens', 'colorDetector', 'comment', 'contextmenu', 'coreCommands', 'cursorUndo', 'dnd', 'find', 'folding', 'fontZoom', 'format', 'goToDefinitionCommands', 'goToDefinitionMouse', 'gotoError', 'gotoLine', 'hover', 'inPlaceReplace', 'inspectTokens', 'iPadShowKeyboard', 'linesOperations', 'links', 'multicursor', 'parameterHints', 'quickCommand', 'quickOutline', 'referenceSearch', 'rename', 'smartSelect', 'snippets', 'suggest', 'toggleHighContrast', 'toggleTabFocusMode', 'transpose', 'wordHighlighter', 'wordOperations', 'wordPartOperations']}),
new webpack.DefinePlugin({
Expand Down Expand Up @@ -103,12 +95,10 @@ module.exports = {
// only specify one entry point
// and require all tests in there
'tests/*.spec.js',
{ pattern: 'node_modules/imjoy-core/dist/*', watched: false, included: false, served: true, nocache: false },
{ pattern: 'src/*.js', watched: false, included: false, served: true, nocache: false },
],

proxies: {
"/base_frame.html": '/base/node_modules/imjoy-core/dist/base_frame.html',
"/plugin-service-worker.js": "/base/node_modules/imjoy-core/dist/plugin-service-worker.js"
},

Expand Down

0 comments on commit b08b7fb

Please sign in to comment.