dohomi / storyblok-generate-ts

Generates TypeScript interface types based on Storyblok component file
MIT License
102 stars 33 forks source link

Suffix can't be empty in the CLI #47

Closed dariusrosendahl closed 1 year ago

dariusrosendahl commented 1 year ago

Hi there!

First off. Thanks for this package! Makes working with SB a lot easier!

I'm having the following problem: perhaps I'm using it wrong, but I can't seem to generate interface names without a suffix.

//package.json
        "generate-sb-types": "storyblok-generate-ts source=./components.XXXXXX.json target=./component-types-sb titlePrefix='I' titleSuffix=''",

Expected result:

export interface Ifeature {
  name?: string;
  _uid: string;
  component: "feature";
  [k: string]: any;
}

Actual result:

export interface IfeatureStoryblok {
  name?: string;
  _uid: string;
  component: "feature";
  [k: string]: any;
}
dohomi commented 1 year ago

I need to look into it but currently on total different mission at work. will try to spare some time on the weekend

dariusrosendahl commented 1 year ago

Anything I can do to help merge #52 and get this into production @dohomi ?

dohomi commented 1 year ago

released with 1.15.1