Closed dkwon17 closed 1 year ago
Signed-off-by: David Kwon dakwon@redhat.com
Part of https://github.com/redhat-developer/try-in-web-ide-browser-extension/issues/6
Before this PR, the project hierarchy is:
try-in-web-ide-browser-extension/ ├── README.md ├── manifest.json ├── options.html ├── options.js ├── osio32.png ├── script.js
After this PR, the hierarchy becomes:
try-in-web-ide-browser-extension/ ├── README.md ├── manifest.json ├── package.json ├── tsconfig.json ├── webpack.config.js └── src/ ├── assets/icons/ │ └── osio32.png ├── options/ │ ├── options.html │ └── options.ts (renamed from options.js) └── contentScript/ └── contentScript.ts (renamed from script.js)
This PR introduces three scripts in package.json:
package.json
"scripts": { "build": "webpack --mode=development", "build:prod": "webpack --mode=production --node-env=production", "watch": "yarn build --watch" }
When developing, run yarn run watch. This will generate the dist folder which contains the bundled extension files. The dist folder contents should be sideloaded the the web browser.
yarn run watch
dist
The hierarchy of the dist folder:
dist/ ├── contentScript.bundle.js ├── manifest.json ├── options.bundle.js ├── options.html └── osio32.png
Signed-off-by: David Kwon dakwon@redhat.com
Part of https://github.com/redhat-developer/try-in-web-ide-browser-extension/issues/6
Before this PR, the project hierarchy is:
After this PR, the hierarchy becomes:
This PR introduces three scripts in
package.json
:When developing, run
yarn run watch
. This will generate thedist
folder which contains the bundled extension files. Thedist
folder contents should be sideloaded the the web browser.The hierarchy of the
dist
folder: