Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Allow customised application name #187

Closed
wants to merge 2 commits into from
Closed

Allow customised application name #187

wants to merge 2 commits into from

Conversation

p-m-p
Copy link

@p-m-p p-m-p commented Jan 5, 2014

I commented on an old closed issue but have had to address this myself for a project I am working on and wanted to raise it again here.

I need to be able to set the main application namespace to that of something other than the root directory. The usage section of the Readme implies that this is already supported by supplying an optional name when generating the app but this is ignored.

I've followed the angular generator which uses the app name argument when generating the app and then pulls the name from the bower.json for sub-generator actions. I can add tests if you are willing to pull this in as a feature, if not I suggest changing the docs to prevent other's frustration.

this.appname = path.basename(process.cwd());
}
this.appname = this._.slugify(this._.humanize(this.appname));

Copy link
Member

Choose a reason for hiding this comment

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

this looks like something that should be in generator core. // @SBoudrias

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we could automatically check for app name when Generator is instantiated.

What would have priority, bower.json or package.json?

Copy link
Member

Choose a reason for hiding this comment

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

bower.json

Copy link
Author

Choose a reason for hiding this comment

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

Sounds good, is there anything I can pick up with this or are you guys onto it?

Copy link
Member

Choose a reason for hiding this comment

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

Feel free to send a PR on the generator system.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, will do...

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @p-m-p!

@addyosmani
Copy link
Member

As we've asked for this to go into the core generator system, can this PR be closed now?

@p-m-p
Copy link
Author

p-m-p commented Jan 8, 2014

Sure, I'll clean it up and reopen there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants