Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to detect if theme is in "dev" mode #10

Open
BryceRussell opened this issue Feb 28, 2024 · 0 comments
Open

Add ability to detect if theme is in "dev" mode #10

BryceRussell opened this issue Feb 28, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed todo Goal for next major release

Comments

@BryceRussell
Copy link
Member

Currently astro-theme-provider runs all code for both the author and user, but in some cases code only needs to be executed while authoring/developing a theme.

astro-theme-provider could solve this by checking for the existence of a package.json inside a playground directory. A theme package already has to be developed inside of a monorepo with a playground for type generation so checking for the existence of the playground's package.json should be a safe way of validating that a theme is running in "dev" mode since this file wont be included in the final output of the package.

export default defineTheme({
  dev: '../playground' // default value
})
@BryceRussell BryceRussell added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 28, 2024
@BryceRussell BryceRussell added the todo Goal for next major release label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed todo Goal for next major release
Projects
Development

No branches or pull requests

1 participant