Skip to content

Commit

Permalink
chore: update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
zjffun committed Aug 24, 2024
1 parent 9755ebb commit d86f6af
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ jobs:
with:
node-version: 16.x
- run: yarn install
- run: xvfb-run -a yarn test
- name: Eslint & Prettier
run: |
npx eslint
npx prettier --check .
- name: Compile
run: |
yarn run compile
yarn run compile-web
- name: Test
run: xvfb-run -a yarn run test
if: runner.os == 'Linux'
- run: yarn test
- name: Test
run: yarn run test
if: runner.os != 'Linux'
9 changes: 7 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ jobs:
with:
node-version: 16.x
- run: yarn install
- run: xvfb-run -a yarn test
- name: Compile
run: |
yarn run compile
yarn run compile-web
- name: Test
run: xvfb-run -a yarn test
- name: Publish
run: yarn run deploy
run: npx vsce publish --yarn
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Publish to Open VSX Registry
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,21 +357,17 @@
]
},
"scripts": {
"vscode:prepublish": "yarn run compile && yarn run compile-web",
"compile": "yarn run editor-view:build && gulp build",
"watch": "concurrently \"yarn run editor-view:watch\" \"gulp watch\"",
"pretest": "yarn run compile && yarn run lint",
"TODO: fix yarn run test-web": "",
"test": "node ./out/test/runTest.js",
"eslint": "eslint",
"eslint-fix": "eslint --fix .",
"prettier-fix": "prettier --write .",
"deploy": "vsce publish --yarn",
"editor-view:watch": "webpack --config ./views/code-snippets-editor/webpack.config.js --watch",
"editor-view:build": "webpack --config ./views/code-snippets-editor/webpack.config.js --mode=production --node-env=production",
"editor-view:build:dev": "webpack --config ./views/code-snippets-editor/webpack.config.js --mode=development",
"watch-web": "webpack --watch",
"compile-web": "webpack --mode production --devtool hidden-source-map",
"pretest-web": "yarn run compile-web",
"test-web": "node ./out/test/runTestWeb.js",
"_vscode:pack": "vsce package",
"_vscode:install": "ls snippetsmanager-*.vsix | xargs code --install-extension",
Expand Down

0 comments on commit d86f6af

Please sign in to comment.