Merge pull request #72 from espressif/bugfix/prepare-script

use rollup script for publish prepare script
This commit is contained in:
Ivan Grokhotkov 2023-01-17 15:05:47 +08:00 committed by GitHub
commit 387a6e4c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -33,7 +33,7 @@ jobs:
- name: Install Node modules - name: Install Node modules
run: | run: |
npm install npm install
npm run rollup npm run build
- name: Setup Pages - name: Setup Pages
uses: actions/configure-pages@v2 uses: actions/configure-pages@v2
- name: Upload artifact - name: Upload artifact

View File

@ -12,11 +12,11 @@ Visit https://espressif.github.io/esptool-js/ to see this tool in action.
``` ```
npm install npm install
npm run rollup npm run build
python3 -m http.server 8008 python3 -m http.server 8008
``` ```
Then open http://localhost:8008 in Chrome or Edge. The `npm run rollup` step builds the `bundle.js` used in the example `index.html`. Then open http://localhost:8008 in Chrome or Edge. The `npm run build` step builds the `bundle.js` used in the example `index.html`.
## License ## License

View File

@ -9,15 +9,14 @@
"bundle.js" "bundle.js"
], ],
"scripts": { "scripts": {
"build": "npm run clean && tsc", "build": "npm run clean && tsc && rollup --config",
"clean": "rimraf lib bundle.js", "clean": "rimraf lib bundle.js",
"format": "prettier --write \"src/**/*.ts\"", "format": "prettier --write \"src/**/*.ts\"",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"lintAndFix": "eslint . --ext .ts --fix", "lintAndFix": "eslint . --ext .ts --fix",
"prepare": "npm run build", "prepare": "npm run build",
"test": "echo \"Error: no test specified\"", "test": "echo \"Error: no test specified\"",
"prepublishOnly": "npm run test && npm run lint", "prepublishOnly": "npm run test && npm run lint"
"rollup": "npm run build && rollup --config"
}, },
"repository": { "repository": {
"type": "git", "type": "git",