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

feat(cli): Add ability to specify component generation config parameters #2427

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nathanb21
Copy link

@nathanb21 nathanb21 commented May 8, 2020

A user can define a prefix and styleFormat parameter in stencil.config.ts to provide more flexibility when working with the stencil generate CLI command.

eg.

import { Config } from '@stencil/core';

export const config: Config = {
...
  componentGeneratorConfig: {
    prefix: 'ion',
    styleFormat: 'scss'
  }
}

The toggle prompts remain the same, referencing scss instead of css in the above example.

This object is optional, with a default app prefix and css format being applied.

Generated files and folders are created without the prefix within the name. Eg. ion-button component would create file/folder structure button, button.tsx etc.

The generation command would change to:

npx stencil generate button instead of npx stencil generate ion-button

Resolves:
#2303
#2347
#2348
#2396

@nathanb21
Copy link
Author

I could remove the default application of app- if we didn't want to force a default on users, then the functionality would remain much the same as current. Let me know your thoughts :)

@nathanb21 nathanb21 requested a review from a team October 6, 2021 16:35
@prodkt
Copy link

prodkt commented Apr 15, 2022

Are there any plans to move forward on this PR?

@noopliez
Copy link

This would be a great help for our projects, too. Writing the tag names/prefixes manually comes always with the possibility of human error...

@nathanb21 nathanb21 requested a review from a team as a code owner May 13, 2024 16:20
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.

None yet

4 participants