cloverfield-tools / cloverfield

A next generation JavaScript boilerplate scaffolding tool.
MIT License
142 stars 8 forks source link

CLI Framework #12

Closed nkbt closed 9 years ago

nkbt commented 9 years ago

I reckon it is a part of #7

This is how it works:

cli-framework

So now we have 3 "binaries":

  1. cloverfield
  2. cf - convenient alias for cloverfield
  3. cf-package - stub for a package scaffold (will be implemented according to #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 to cf-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 and prompt 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

ericelliott commented 9 years ago

I don't see any unit tests. Did I miss something?

ericelliott commented 9 years ago

Over-all, great work. :clap:

nkbt commented 9 years ago

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.

ericelliott commented 9 years ago

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. =)

ericelliott commented 9 years ago

And thanks for being a rockstar on this project lately. :guitar: :fire:

nkbt commented 9 years ago

Thanks, it's a pleasure. Always fun to do some meaningful and interesting work.

nkbt commented 9 years ago

Blue-tape does not have CLI support (the one tape has). I've just made a PR that fixes this issue: https://github.com/spion/blue-tape/pull/12

Until it is fixed, I have to add some automation to our tests.

ericelliott commented 9 years ago

It does now. =)

nkbt commented 9 years ago

Seen it. Will remove tape dependency later today