Skip to content

Conversation

@dipankarmaikap
Copy link
Contributor

@dipankarmaikap dipankarmaikap commented Jan 13, 2026

This PR adds support for the --sf or --separate-files flag.

When this flag is enabled, the generator outputs individual type files instead of a single combined file.

What’s new

With --sf or --separate-files enabled, the following files are generated:

  • Individual type files for each component
  • datasources.d.ts, containing all datasource types
  • content-types.d.ts, containing the ContentType type. Combine of all content type blocks

This makes the output more modular and easier to manage in larger projects.

Why this change

Splitting types into separate files improves:

  • Type organization
  • Scalability for projects with many content types
  • Easier imports and better editor performance in some setups

Usage

storyblok types generate --space 287696225873334 --sf
# or
storyblok types generate --space 287696225873334 --separate-files

Closes #265
Closes #388

@cursor
Copy link

cursor bot commented Jan 13, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on February 1.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 13, 2026

Open in StackBlitz

@storyblok/astro

npm i https://pkg.pr.new/@storyblok/astro@406

storyblok

npm i https://pkg.pr.new/storyblok@406

@storyblok/eslint-config

npm i https://pkg.pr.new/@storyblok/eslint-config@406

@storyblok/js

npm i https://pkg.pr.new/@storyblok/js@406

storyblok-js-client

npm i https://pkg.pr.new/storyblok-js-client@406

@storyblok/management-api-client

npm i https://pkg.pr.new/@storyblok/management-api-client@406

@storyblok/nuxt

npm i https://pkg.pr.new/@storyblok/nuxt@406

@storyblok/react

npm i https://pkg.pr.new/@storyblok/react@406

@storyblok/region-helper

npm i https://pkg.pr.new/@storyblok/region-helper@406

@storyblok/richtext

npm i https://pkg.pr.new/@storyblok/richtext@406

@storyblok/svelte

npm i https://pkg.pr.new/@storyblok/svelte@406

@storyblok/vue

npm i https://pkg.pr.new/@storyblok/vue@406

commit: dc3d03b

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.

🐛 [Bug]: storyblok ts generate --separate-files generates a single file [v4] - type generate command does not honour --separate-files arg

1 participant