Parcourir la source

Test ci changes

master
Palash Bansal il y a 2 ans
Parent
révision
1ccb824e4f
Aucun compte lié à l'adresse e-mail de l'auteur
3 fichiers modifiés avec 15 ajouts et 6 suppressions
  1. 4
    5
      .github/workflows/deploy-pages.yml
  2. 3
    1
      package.json
  3. 8
    0
      scripts/each-plugin.mjs

+ 4
- 5
.github/workflows/deploy-pages.yml Voir le fichier

@@ -37,14 +37,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
# cache: 'npm'
# cache-dependency-path: '**/package-lock.json' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
- run: npm ci # this will also run `npm run prepare` which will build
- run: npm run docs
- run: npm run docs-all
- run: mkdir _site
- run: mv -t _site src docs dist examples README.md LICENSE index.html
- run: mkdir -p _site/plugins

+ 3
- 1
package.json Voir le fichier

@@ -23,7 +23,9 @@
"serve-docs": "ws -d docs -p 8080",
"serve": "ws -d . -p 9229",
"docs": "npx typedoc && markdown-to-html",
"build-plugins": "node scripts/build-plugins.mjs",
"docs-plugins": "node scripts/each-plugin.mjs run docs",
"docs-all": "npm run docs && npm run docs-plugins",
"build-plugins": "node scripts/each-plugin.mjs ci",
"prepare": "npm run build && npm run compile && npm run build-plugins && npm run build-examples",
"update-version": "echo \"export const VERSION = '$npm_package_version'\" > src/viewer/version.ts"
},

+ 8
- 0
scripts/each-plugin.mjs Voir le fichier

@@ -0,0 +1,8 @@
import {execEachPlugin} from "./utils.mjs";

const command = process.argv.slice(2).join(' ')
if(!command) throw new Error('Command is required')
console.log(`Executing '${command}' in all plugins`)

// Each plugin should have "prepare" that will also build the plugin
execEachPlugin(`npm ${command}}`) // install dependencies

Chargement…
Annuler
Enregistrer