Skip to content

Commit

Permalink
Extension size reduction (#44)
Browse files Browse the repository at this point in the history
* reducing size using GENERATE_SOURCEMAP=false

* refactor imports

* deleted build analyzer file

* changed build library

* changed build script

* added link to centml documents
  • Loading branch information
johncalesp authored Mar 2, 2023
1 parent a2fc654 commit 7e28b14
Show file tree
Hide file tree
Showing 27 changed files with 244 additions and 379 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

![Demo GIF](https://raw.githubusercontent.com/CentML/mltools-vscode/jun07-usability-improvements/images/demo.gif)

## Documentation
https://docs.centml.ai/index.html

## Installation
Installation consists of two parts: the front-end UI (this repository) and [Skyline](https://github.com/CentML/skyline) (the backend), which needs to be installed separately.

Expand Down
11 changes: 4 additions & 7 deletions scripts/build_vsix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@

# Build react UI
pushd skyline-vscode/react-ui && \
npm install --legacy-peer-deps && \
CI=false npm run build && \
npm install && \
npm run build && \
popd;

# Build backend
# TODO: Replace "npm install react" with a proper fix in package.json
pushd skyline-vscode && \
npm install --legacy-peer-deps && \
npm install && \
pushd src/protobuf &&
make && make old && \
popd && \
npm install react react-dom && \
yes | vsce package && \
vsce package && \
popd;

17 changes: 0 additions & 17 deletions scripts/build_vsix_dev.sh

This file was deleted.

12 changes: 8 additions & 4 deletions skyline-vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
node_modules/
out/
!out/main.js
src/
react-ui/
!react-ui/build
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
**/*.ts
23 changes: 8 additions & 15 deletions skyline-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"activationEvents": [
"onCommand:skyline-vscode.cmd_begin_analyze"
],
"main": "./out/extension.js",
"main": "./out/main.js",
"contributes": {
"commands": [
{
Expand All @@ -39,12 +39,11 @@
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"test-compile": "tsc -p ./"
},
"devDependencies": {
"@types/glob": "^7.1.4",
Expand All @@ -55,20 +54,14 @@
"@typescript-eslint/eslint-plugin": "^4.31.1",
"@typescript-eslint/parser": "^4.31.1",
"@vscode/test-electron": "^1.6.2",
"esbuild": "^0.17.10",
"eslint": "^7.32.0",
"glob": "^7.1.7",
"mocha": "^9.1.1",
"typescript": "^4.4.3"
},
"dependencies": {
"@types/ws": "^8.2.0",
"bootstrap-fork": "^3.3.6",
"google-protobuf": "^3.18.0",
"nunjucks": "^3.2.3",
"react": "^18.2.0",
"react-bootstrap": "^2.2.0",
"react-dom": "^18.2.0",
"ts-protoc-gen": "^0.15.0",
"ws": "^8.2.3"
"ts-protoc-gen": "^0.15.0"
}
}
3 changes: 3 additions & 0 deletions skyline-vscode/react-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# build package info
analyze.js
Loading

0 comments on commit 7e28b14

Please sign in to comment.