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 watch mode #20

Open
angeloashmore opened this issue Jun 24, 2022 · 1 comment
Open

Add watch mode #20

angeloashmore opened this issue Jun 24, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@angeloashmore
Copy link
Member

  • Only for local files.
  • Regenerate types whenever a watched file is updated.
@angeloashmore angeloashmore added the enhancement New feature or request label Jun 24, 2022
@andre-lergier
Copy link

I would really appreciate this feature.

As context:
I have a monorepo that has a package slice-library, that is used by multiple websites/apps in this repo.

Therefore I have the following config:

import type { Config } from 'prismic-ts-codegen';

const config: Config = {
  output: './types.generated.ts',
  models: [
    './shared/**/model.json',
    './[app-1]/**/model.json',
    './[app-2]/**/model.json',
    '../../apps/[app-1]/customtypes/**/index.json',
    '../../apps/[app-2]/customtypes/**/index.json',
  ],
};

export default config;

A watch mode that would recompile the types when a model or custom type changes would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants