diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cba6a7..3ede965 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,8 @@ jobs: - run: yarn install + - run: yarn electron rebuild + - run: yarn electron build - run: yarn electron package diff --git a/applications/browser/package.json b/applications/browser/package.json index 02abcf8..118332f 100644 --- a/applications/browser/package.json +++ b/applications/browser/package.json @@ -43,15 +43,5 @@ }, "theia": { "target": "browser" - }, - "theiaPluginsDir": "plugins", - "theiaPlugins": { - "vscode.git": "https://open-vsx.org/api/vscode/git/1.52.1/file/vscode.git-1.52.1.vsix", - "vscode.markdown-language-features": "https://open-vsx.org/api/vscode/markdown-language-features/1.39.2/file/vscode.markdown-language-features-1.39.2.vsix", - "vscode-builtin-extensions-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.50.1/file/eclipse-theia.builtin-extension-pack-1.50.1.vsix" - }, - "theiaPluginsExcludeIds": [ - "vscode.extension-editing", - "vscode.microsoft-authentication" - ] + } } diff --git a/applications/electron/electron-builder.yml b/applications/electron/electron-builder.yml index 0a5c0ed..9043d97 100644 --- a/applications/electron/electron-builder.yml +++ b/applications/electron/electron-builder.yml @@ -2,7 +2,7 @@ appId: coderibbon.coderibbon-theia productName: CodeRibbon-Preview electronDist: ../../node_modules/electron/dist -electronVersion: 15.5.7 +electronVersion: 23.2.4 asar: false directories: @@ -14,7 +14,7 @@ files: - scripts - "!**node_modules/electron/**" extraResources: - - from: plugins + - from: ../../plugins to: app/plugins linux: diff --git a/applications/electron/package.json b/applications/electron/package.json index cc8d497..f1f5ae7 100644 --- a/applications/electron/package.json +++ b/applications/electron/package.json @@ -28,31 +28,28 @@ "electron-builder": "^24.12.0" }, "scripts": { - "prepare": "yarn build && yarn download:plugins", "clean": "theia clean && rimraf node_modules", "clean:dist": "rimraf dist", - "build": "yarn -s bundle", - "bundle": "theia build", - "rebuild": "theia rebuild:electron --cacheRoot ../..", + "build": "yarn -s rebuild && theia build --app-target=\"electron\" --mode development", + "build:prod": "yarn -s rebuild && theia build --app-target=\"electron\"", + "rebuild": "theia rebuild:electron --cacheRoot .", "watch": "concurrently -n compile,bundle \"theiaext watch --preserveWatchOutput\" \"theia build --watch --mode development\"", - "start": "yarn -s rebuild && electron scripts/theia-electron-main.js", + "start": "electron scripts/theia-electron-main.js --plugins=local-dir:../../plugins", "start:debug": "yarn start --log-level=debug", - "package": "yarn clean:dist && electron-builder -c.mac.identity=null --publish never", + "package": "yarn clean:dist && yarn rebuild && electron-builder -c.mac.identity=null --publish never", "deploy": "yarn clean:dist && electron-builder -c.mac.identity=null --publish always", - "package:preview": "yarn clean:dist && electron-builder -c.mac.identity=null --dir", + "package:preview": "yarn clean:dist && yarn rebuild && electron-builder -c.mac.identity=null --dir", "update:checksum": "ts-node scripts/update-checksum.ts", - "update:next": "ts-node ../../scripts/update-theia-to-next.ts", - "download:plugins": "theia download:plugins --rate-limit=1" + "update:next": "ts-node ../../scripts/update-theia-to-next.ts" }, "theia": { - "target": "electron" - }, - "theiaPluginsDir": "plugins", - "theiaPlugins": { - "vscode.git": "https://open-vsx.org/api/vscode/git/1.52.1/file/vscode.git-1.52.1.vsix" - }, - "theiaPluginsExcludeIds": [ - "vscode.extension-editing", - "vscode.microsoft-authentication" - ] + "target": "electron", + "frontend": { + "config": { + "electron": { + "showWindowEarly": false + } + } + } + } } diff --git a/package.json b/package.json index b1f6dea..5b25f0a 100644 --- a/package.json +++ b/package.json @@ -8,16 +8,17 @@ "url": "https://github.com/CodeRibbon/CodeRibbon-Theia/issues" }, "scripts": { + "clean": "lerna run clean && rimraf node_modules", + "build": "lerna run build", "prepare": "lerna run prepare --concurrency 1", "watch": "lerna run --parallel watch", "lint": "lerna run lint", "lint:fix": "lerna run lint:fix", - "clean": "lerna run clean && rimraf node_modules", - "build": "lerna run build", "bundle": "lerna run bundle", "test": "lerna run test", "browser": "yarn --cwd applications/browser", - "electron": "yarn --cwd applications/electron" + "electron": "yarn --cwd applications/electron", + "download:plugins": "theia download:plugins --rate-limit=15 --parallel=false --ignore-errors" }, "devDependencies": { "@theia/cli": "1.46.1", @@ -42,5 +43,17 @@ "workspaces": [ "coderibbon-theia", "applications/*" + ], + "theiaPluginsDir": "plugins", + "theiaPlugins": { + "vscode.git": "https://open-vsx.org/api/vscode/git/1.52.1/file/vscode.git-1.52.1.vsix", + "vscode.markdown-language-features": "https://open-vsx.org/api/vscode/markdown-language-features/1.39.2/file/vscode.markdown-language-features-1.39.2.vsix", + "vscode-builtin-extensions-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.50.1/file/eclipse-theia.builtin-extension-pack-1.50.1.vsix" + }, + "theiaPluginsExcludeIds": [ + "vscode.extension-editing", + "vscode.microsoft-authentication", + "ms-vscode.js-debug-companion", + "VisualStudioExptTeam.vscodeintellicode" ] }