Skip to content

Fix defects in new-plugin/new-extension/new-timeline scaffolds#56

Merged
jodeleeuw merged 1 commit into
mainfrom
fix-template-bugs
Jun 15, 2026
Merged

Fix defects in new-plugin/new-extension/new-timeline scaffolds#56
jodeleeuw merged 1 commit into
mainfrom
fix-template-bugs

Conversation

@jodeleeuw

Copy link
Copy Markdown
Member

Fixes several defects encountered while using the new-plugin scaffold (and the equivalent bugs in new-extension / new-timeline).

Fixes

  • CITATION.cff (new-plugin, new-extension): stop injecting the full author name into family-names, given-names, and name-particle simultaneously, and remove the {email} / {softwareUrl} / {title} / {linkToPublicationInJournal} placeholders that were never substituted. These are now clean fill-in fields.
  • README "Loading" snippet (new-plugin, new-extension): import from the scoped npm package name (e.g. @jspsych-contrib/plugin-x instead of plugin-x) and close the in-browser <script> tag.
  • examples/index.html (all packages): load the local build as a live <script> instead of leaving it commented out inside the "once published" block. This was fatal for the JS templates, which previously had no live local script at all.
  • new-timeline build: emit the browser bundle as dist/index.browser.min.js (via a new tsup.config.ts) to match the unpkg field and the other packages, instead of dist/index.global.js.
  • .gitignore scaffolding: generated packages now include a .gitignore (ignoring dist/ and node_modules/). The template ships as gitignore and is renamed during scaffolding so npm doesn't rewrite it to .npmignore on publish. Adopted PR auto-generate documentation from JSDoc strings for timelines  #38's dot: true glob option as well.

Notes / relationship to #38

This overlaps with #38 (generate-readme-from-docstrings) and will conflict in two places where these are the more complete fixes:

  • new-plugin / new-extension cli.js publishing-comment block
  • new-timeline/templates/timeline-template-ts/package.json (this PR switches build to tsup + a config file; auto-generate documentation from JSDoc strings for timelines  #38 adds an update-readme script + @jspsych-dev/generate-timeline-docs dep). These two need hand-merging.

Verification

  • All three cli.js files parse (node --check).
  • The tsup browser-bundle rename and the gitignore.gitignore scaffolding rename were not run end-to-end (template node_modules aren't installed in this checkout) — worth a quick npx @jspsych/new-plugin / new-timeline smoke test before release to confirm a generated package contains .gitignore and dist/index.browser.min.js.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f7454a7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@jspsych/new-plugin Patch
@jspsych/new-extension Patch
@jspsych/new-timeline Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

- CITATION.cff: stop injecting the full author name into family-names,
  given-names, and name-particle; remove unsubstituted {email}/{softwareUrl}/
  {title} placeholders (new-plugin, new-extension)
- README "Loading" snippet: import from the scoped npm package name and close
  the in-browser <script> tag (new-plugin, new-extension)
- examples/index.html: load the local build as a live <script> instead of
  leaving it commented out in the "once published" block
- new-timeline: build the browser bundle as dist/index.browser.min.js via a
  tsup.config.ts to match the unpkg field and the other packages
- ship a .gitignore in generated packages (as "gitignore", renamed during
  scaffolding to avoid npm rewriting it to .npmignore on publish)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant