-
Notifications
You must be signed in to change notification settings - Fork 102
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
Cleanup the high number of ways to "start" a CouchApp with couchapp
#198
Comments
Here's a comparison of the 3 varied outputs we have now.
This last bit is what I think we should keep:
|
Hmmm.. I think we should redefine the goal of If |
@BigBlueHat Hmm... I re-read your post again and dug into our codebase. I think the original design is we provide different level of starting a couchapp. original design says that:
So the stuff get more and more from It's time to decide that do we need to support 3 level of init? |
- add docstring - setup app dir via `util.setup_dir` ref couchapp#198
- setup app dir via `util.setup_dir` ref couchapp#198
Different level of 'init': 1. default 2. empty 3. template 1. level 'default', this will invoke `couchapp.generator.init_basic` $ couchapp init dir dir/ .couchapprc .couchappignore _attachments/ lists/ shows/ updates/ views/ 2. level 'empty' $ couchapp init -e dir dir/ .couchapprc .couchappignore 3. level 'template', invoke `couchapp.generator.init_template` $ couchapp init -t mytemplate dir dir/ .couchapprc .couchappignore ... vendors ... ref couchapp#198
Right now, you can us any of the following commands each with their own unique way of doing things...
couchapp init
Directory contents:
couchapp startapp
🐛 Fails with error
2015-11-13 10:41:58 [ERROR] couchapp error: Can't start an app, name or path is missing
, but generates the same ascouchapp init
above.couchapp startapp NAME
2015-11-13 10:44:30 [INFO] c:\Users\Benjamin\Documents\GitHub\anno-mail\temp\NAME created.
Creates a
NAME
directory who's contents are:couchapp startapp . NAME
🐛 This is supposed to support passing in a
COUCHAPPDIR
param beforeNAME
, but.
is unsupported...apparently.Outputs
2015-11-13 10:46:51 [INFO] NAME created.
with aNAME
directory (which it shouldn't do) which matches the above contents.couchapp generate NAME
🐛 This one seems to attempt to use the current directory (if one's unspecified) rather than auto-magically creating a directory for
NAME
in the way thatstartapp
does.Outputs
2015-11-13 10:48:56 [ERROR] couchapp error: Can't create a CouchApp in c:\current\directory: Cannot create a file when that file already exists
Trying
couchapp generate . NAME
checks.
against the options lists (which makes sense given the param list. Outputs2015-11-13 10:50:11 [ERROR] couchapp error: Can't generate . in your couchapp. generator is unknown
🐛 This also failed...again not doing what
startapp
did:This worked, however.
But the directory contents are different than
startapp
's:Proposal
startapp
init
to replacestartapp
andgenerate app
generate app
system with the--template
optiongenerate app
-- keep it focused on generating the other thingsstartapp
does now--so, no jquery, no vendor, no .js, .html, or .cssThe text was updated successfully, but these errors were encountered: