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(page): add --create-module option #220

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

Conversation

imhoffd
Copy link
Contributor

@imhoffd imhoffd commented Mar 25, 2020

Aligning the page schematic with the component schematic, which already offers --create-module. The default for the page schematic is true, unlike the component schematic. To disable module creation, --create-module=false must be specified.

fixes https://github.com/ionic-team/ionic-cli/issues/3586

Base automatically changed from master to main February 12, 2021 15:58
@rdlabo
Copy link
Contributor

rdlabo commented May 13, 2021

I look forward to seeing this feature merged!🙌

"createModule": {
"type": "boolean",
"description": "Allows creating an NgModule for the page",
"default": true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think default should set to be false so that we can keep existing changes without breaking it.

@@ -163,6 +163,7 @@ export default function(options: PageOptions): Rule {

const templateSource = apply(url('./files'), [
options.spec ? noop() : filter(p => !p.endsWith('.spec.ts')),
options.createModule ? noop() : filter(p => !p.endsWith('.module.ts')),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we could add some unit tests to validate these changes and keep align with existing behavior. :)

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.

3 participants