Skip to content

Commit 4d3ed24

Browse files
committed
Build the library bundle before generating the schema
1 parent b1e1157 commit 4d3ed24

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@
2828
"bundle": "node tasks/bundle.mjs",
2929
"extra-bundles": "node tasks/extra_bundles.mjs",
3030
"locales": "node tasks/locales.js",
31-
"schema": "node tasks/schema.mjs",
31+
"schema": "npm run build-dev && node tasks/schema.mjs",
3232
"stats": "node tasks/stats.js",
3333
"find-strings": "node tasks/find_locale_strings.js",
3434
"preprocess": "node tasks/preprocess.js",
3535
"use-draftlogs": "node tasks/use_draftlogs.js",
3636
"empty-draftlogs": "node tasks/empty_draftlogs.js",
3737
"empty-dist": "node tasks/empty_dist.js",
3838
"build": "npm run empty-dist && npm run preprocess && npm run find-strings && npm run bundle && npm run extra-bundles && npm run locales && npm run schema dist && npm run stats",
39+
"build-dev": "node tasks/build_dev.mjs",
3940
"regl-codegen": "node devtools/regl_codegen/server.mjs",
4041
"cibuild": "npm run empty-dist && npm run preprocess && node tasks/cibundle.mjs",
4142
"lint": "npx @biomejs/biome lint",

tasks/build_dev.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { build } from 'esbuild';
2+
import config from '../esbuild-config.js';
3+
4+
// Build the bundle that's used in the devtools server and when generating the schema
5+
await build({
6+
...config,
7+
outfile: './build/plotly.js'
8+
});

0 commit comments

Comments
 (0)