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
CLI Framework #12
CLI Framework #12
Conversation
@@ -0,0 +1,35 @@ | |||
#! /usr/bin/env ./node_modules/.bin/babel-node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice trick to run CLI-scripts with babel-node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
@@ -0,0 +1,32 @@ | |||
# Created by .ignore support plugin (hsz.mobi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you've made general improvements to this file that would be useful to prod-module-boilerplate
, could you make sure they're reflected there, too? I haven't looked myself...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is quite common. Created if you make a new Github project and choose Node
as default .gitignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I don't see any unit tests. Did I miss something? |
Over-all, great work. 👏 |
I wasn't sure about tests, since they require additional libs pulled into a project. As well as eslint. Was thinking of doing it in a separate PR to keep focus on CLI frameworks itself in this one. |
Consider testing a requirement for all substantial code commits. Since we don't have the supporting stuff added here yet, feel free to add them with this initial PR. =) |
And thanks for being a rockstar on this project lately. 🎸 🔥 |
Thanks, it's a pleasure. Always fun to do some meaningful and interesting
work.
|
"max-statements": [0, 10], | ||
"new-parens": [2], | ||
"new-cap": [0], | ||
"newline-after-var": [2], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set it to required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also in prod-module-boilerplate? =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, need that update there too. It actually gets bit annoying to propagate changes. I've got the same issues with my own modules. Not sure what is the best solution. Maybe some "defaults" repo with stuff and couple of scripts like npm install && cp -f ./node_modules/defaults/.eslintrc ./
?
What do you reckon?
Blue-tape does not have CLI support (the one Until it is fixed, I have to add some automation to our tests. |
It does now. =) |
Seen it. Will remove |
I reckon it is a part of #7
This is how it works:
So now we have 3 "binaries":
cloverfield
cf
- convenient alias forcloverfield
cf-package
- stub for apackage
scaffold (will be implemented according to Use prod module boilerplate #10)cf
has only one command available for now:build
with a single option<scaffold>
. See code comments for details.cf build package
is equivalent tocf-package
and starts step-by-step "wizard".Regarding libs choice. I checked different commands, args and prompt libs and the most friendly seems to be
nomnom
for commands and options andprompt
for, hm.., prompt. I used other libs before (like commander.js) and found them quite syntax-heavy and not fun.If we are ok with tooling, I can actually implement
scaffold/package
#10 now. Should be pretty straightforward.PS: CLI colors and messages can be customized