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

Implementing --appPath option to scaffold into custom directory#181

Merged
revathskumar merged 1 commit intoyeoman:masterfrom
revathskumar:appPath
Dec 11, 2013
Merged

Implementing --appPath option to scaffold into custom directory#181
revathskumar merged 1 commit intoyeoman:masterfrom
revathskumar:appPath

Conversation

@revathskumar
Copy link
Copy Markdown
Member

Helps user to scaffold application into custom directory instead of "app"

yo backbone --appPath=public

This will scaffold application into public directory.
This uses .yo-rc.json for storing appPath config.
https://twitter.com/jayjog/status/399971817646874624

@revathskumar
Copy link
Copy Markdown
Member Author

@addyosmani
Copy link
Copy Markdown
Member

I understand what's being done with .yo-rc.json here, but I'm trying to understand the use-case better. Would this mostly be used for when you're skipping all prompts?

@revathskumar
Copy link
Copy Markdown
Member Author

That's mainly for sub generators.

On Sunday, 8 December 2013, Addy Osmani wrote:

I understand what's being done with .yo-rc.json here, but I'm trying to
understand the use-case better. Would this mostly be used for when you're
skipping all prompts?


Reply to this email directly or view it on GitHubhttps://github.com//pull/181#issuecomment-30083614
.

with regards,
Revath S Kumar,
Rubyist / JavaScripter / PHP

markdownblogger.herokuapp.com

www.phprepo.in
revathskumar.com
+919995436867

http://twitter.com/revathskumar http://www.linkedin.com/in/revathskumar
http://www.gplus.to/rsk http://www.about.me/revathskumar
http://www.phprepo.in/
http://www.github.com/revathskumar http://www.youtube.com/revathskumar
http://blog.revathskumar.com
https://foursquare.com/revathskumar [image:
normal-1.png] http://careers.stackoverflow.com/revathskumar

app/index.js Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this.appPath = this.options.appPath || this.appPath;
instead of lines 15 and 17

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍

@revathskumar
Copy link
Copy Markdown
Member Author

@addyosmani .yo-rc.json is not used to skip the prompts, rather we use to share options like appPath, coffee, testTemplate etc between generator and subgenerator.

Now when yo backbone --appPath=public generates scaffolds into public directory. So later when we use subgenerator yo backbone:model name, the model subgenerator will read appPath from .yo-rc.json and generated to appropriate directory.

Currently we are not using prompts for sub-generators.

I was working on saving other options to .yo-rc.json #177

.travis.yml Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is moot. caching is only available for private instances.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ok will remove the commit.

Helps user to scaffold application into custom directory instead
of "app"

`yo backbone --appPath=public`

This will scaffold application into "public" directory.

https://twitter.com/jayjog/status/399971817646874624
revathskumar added a commit that referenced this pull request Dec 11, 2013
Implementing --appPath option to scaffold into custom directory
@revathskumar revathskumar merged commit 01c5e6f into yeoman:master Dec 11, 2013
@revathskumar revathskumar deleted the appPath branch January 30, 2014 16:38
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.

4 participants