diff --git a/package.json b/package.json index 20003d17..b0b53ea1 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "test-merge": "node ./test/test-merge.js", "test-merge-istanbul": "node ./test/test-merge-istanbul.js", "test-client": "node ./test/test-client.js", - "test-all": "npm run test-node && npm run test-browser && npm run test-cli && npm run test-tsx && npm run test-merge", + "test-all": "npm run test-node && npm run test-browser && npm run test-cli && npm run test-tsx && npm run test-merge && node ./scripts/docs.js", "test": "npx mcr npm run test-all -c test/mcr.config.mcr.js", "test:snap": "cross-env TEST_SNAPSHOT=true npm run test", "dev": "sf d v8", diff --git a/scripts/docs.js b/scripts/docs.js new file mode 100644 index 00000000..6b19e06d --- /dev/null +++ b/scripts/docs.js @@ -0,0 +1,42 @@ +const fs = require('fs'); +const path = require('path'); + +const Util = require('../lib/utils/util.js'); + +const buildDocs = () => { + + console.log('build docs ...'); + + const docsDir = path.resolve(__dirname, '../docs'); + const list = fs.readdirSync(docsDir, { + withFileTypes: true + }); + + const html = ['