Skip to content

Commit 1982061

Browse files
committed
chore(docs): generate just typings for docs build Workflow
ie. no need to build the entire Blockly package, with Closure compiler, just for the docs
1 parent 7d3fc22 commit 1982061

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/deploy-docusaurus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ jobs:
5151
- name: Install dependencies
5252
run: npm ci
5353

54-
- name: Build Blockly and generate reference docs
54+
- name: Generate reference docs
5555
working-directory: ./packages/blockly
5656
run: |
57-
npm run package
57+
npx gulp typings
5858
npm run docs
5959
6060
- name: Build the Docusaurus site

packages/blockly/gulpfile.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
syncMaster,
4040
updateGithubPages,
4141
} from './scripts/gulpfiles/git_tasks.mjs';
42-
import {cleanReleaseDir, pack} from './scripts/gulpfiles/package_tasks.mjs';
42+
import {cleanReleaseDir, pack, typings} from './scripts/gulpfiles/package_tasks.mjs';
4343
import {
4444
publish,
4545
publishBeta,
@@ -88,6 +88,7 @@ export {
8888
buildAdvancedCompilationTest,
8989
createRC as gitCreateRC,
9090
docs,
91+
typings,
9192
}
9293

9394
// Legacy targets, to be deleted.

packages/blockly/scripts/gulpfiles/package_tasks.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ export function cleanReleaseDir() {
240240
*
241241
* Prerequisite: build.
242242
*/
243+
export const typings = gulp.series(
244+
gulp.parallel(build.cleanBuildDir, cleanReleaseDir),
245+
build.tsc,
246+
packageDTS);
247+
243248
export const pack = gulp.series(
244249
gulp.parallel(
245250
build.cleanBuildDir,

packages/docs/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
let referenceSidebar = [];
44
try {
5-
({ referenceSidebar } = await import('./docs/reference/_reference.js'));
5+
referenceSidebar = require('./docs/reference/_reference.js').referenceSidebar;
66
} catch {
77
console.warn('Reference sidebar not found — run "npm run docs" in packages/blockly to generate it.');
88
}

0 commit comments

Comments
 (0)