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

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

Merged
merged 1 commit into from
Dec 11, 2013

Conversation

revathskumar
Copy link
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
Member Author

@addyosmani
Copy link
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
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

this.appPath = 'app';
if (this.options.appPath) {
this.appPath = this.options.appPath;
this.config.set('appPath', this.options.appPath);
}
Copy link
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
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
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

@@ -2,3 +2,6 @@ language: node_js
node_js:
- '0.10'
- '0.8'
cache:
directories:
- node_modules
Copy link
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
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