Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

build: Add build step before generating the schema#7589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
camdecoster merged 8 commits intomasterfromcam/7538/build-bundle-before-schema
Oct 20, 2025

Conversation

@camdecoster
Copy link
Contributor

@camdecostercamdecoster commentedOct 15, 2025
edited
Loading

Description

Add build step before generating the schema.

Closes#7538.

Changes

  • Lints/formats files
  • Consolidates esbuild configs to one file
  • Updates references per above change
  • Adds build step before generating the schema vianpm run schema

Testing

  • Check CI to see if it's completing successfully
  • Be on master
  • Do not start the dashboard
  • Make a change to a description in an attributes file
  • Runnpm run schema
  • Note thattest/plot-schema.json is not updated
  • Switch to this branch
  • Runnpm run schema
  • Note thattest/plot-schema.json IS updated

Notes

  • Running the dashboard withnpm start builds the library every time a change is made
  • If the schema is generated when the dashboard is running, the changes to the attributes are picked up
  • When the dashboard isn't running, the changes aren't picked up
  • The build script takes care of this case and uses the same esbuild config as the dashboard

@camdecostercamdecoster marked this pull request as ready for reviewOctober 15, 2025 22:52
@camdecostercamdecoster self-assigned thisOct 15, 2025
logLevel:'info'
};

constdevtoolsConfig={
Copy link
Contributor

@emilyklemilyklOct 16, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@camdecoster Could you add a comment above each of these configs explaining what it's used for (to the extent that you know)?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'll come up with something, but the variable names were my attempt at a description.

emilykl reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@camdecoster After the cleanup you've done, does this step really need a separate file? Couldn't you just now addbuild(localDevConfig); to the beginning of themakeSchema() function inschema.mjs?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

That's a fair question. I envisioned this script as being one that could be called elsewhere, but that seems like it violates the YAGNI principle. I'll do as you suggest. We can always add it back.

emilykl reacted with thumbs up emoji
@emilykl
Copy link
Contributor

@camdecoster Not a big deal but looks like this results in an extraplotly.js build at the end ofnpm run build:

(base) ekl@Emilys-MacBook-Air-2 plotly.js % npm run build> plotly.js@3.1.1 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> plotly.js@3.1.1 empty-dist> node tasks/empty_dist.jsempty /Users/ekl/code/plotly.js/dist/topojson/empty /Users/ekl/code/plotly.js/dist/> plotly.js@3.1.1 preprocess> node tasks/preprocess.js> plotly.js@3.1.1 find-strings> node tasks/find_locale_strings.jsok find_locale_strings - wrote new key file.> plotly.js@3.1.1 bundle> node tasks/bundle.mjs  dist/plotly.js  10.7mb ⚠️⚡ Done in 732ms ... ... ...ok plotly-locale-bs.jsok plotly-locale-af.jsok plotly-locale-es-pe.js> plotly.js@3.1.1 schema> node devtools/test_dashboard/build.mjs && node tasks/schema.mjs dist  build/plotly.js  11.0mb ⚠️⚡ Done in 225msok plot-schema.json> plotly.js@3.1.1 stats> node tasks/stats.js

Copy link
Contributor

@emilyklemilykl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@camdecoster
Copy link
ContributorAuthor

@camdecoster Not a big deal but looks like this results in an extraplotly.js build at the end ofnpm run build

@emilykl this shouldn't cause issues because it's building the library in two different locations: dist and build. The one in build is what's used to generate the schema. It's a little extra overhead, but now we don't have to worry about the schema getting out of sync with the library.

emilykl reacted with thumbs up emoji

@camdecostercamdecoster merged commit80c7c7d intomasterOct 20, 2025
5 of 6 checks passed
@camdecostercamdecoster deleted the cam/7538/build-bundle-before-schema branchOctober 20, 2025 20:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@emilyklemilyklemilykl approved these changes

@alexshoealexshoeAwaiting requested review from alexshoe

Assignees

@camdecostercamdecoster

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

plotly.js bundle isn't rebuilt when generating schema

3 participants

@camdecoster@emilykl

[8]ページ先頭

©2009-2025 Movatter.jp