Skip to content

Commit cca97ed

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 363edf0 commit cca97ed

4 files changed

Lines changed: 14 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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ import {
3434
} from './scripts/gulpfiles/build_tasks.mjs';
3535
import {docs} from './scripts/gulpfiles/docs_tasks.mjs';
3636
import {updateGithubPages} from './scripts/gulpfiles/git_tasks.mjs';
37-
import {cleanReleaseDir, pack} from './scripts/gulpfiles/package_tasks.mjs';
37+
import {
38+
cleanReleaseDir,
39+
pack,
40+
typings,
41+
} from './scripts/gulpfiles/package_tasks.mjs';
3842
import {publish, publishBeta} from './scripts/gulpfiles/release_tasks.mjs';
3943
import {
4044
generators,
@@ -78,4 +82,5 @@ export {
7882
interactiveMocha,
7983
buildAdvancedCompilationTest,
8084
docs,
85+
typings,
8186
}

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)