From 23cfa83fb2acef5d68e620615a5d161662bc11db Mon Sep 17 00:00:00 2001 From: Jeff Escalante Date: Thu, 10 Apr 2014 18:52:55 -0400 Subject: [PATCH] make add uri optional, expose cli module, update justification --- lib/cli.coffee | 1 + lib/index.coffee | 1 + readme.md | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cli.coffee b/lib/cli.coffee index f1425bd..7adc056 100644 --- a/lib/cli.coffee +++ b/lib/cli.coffee @@ -61,6 +61,7 @@ class CLI s.addArgument ['name'], help: 'Name of the template you want to add' s.addArgument ['uri'], + nargs: '?' help: 'A `git clone`-able url or local path to your template' s.setDefaults(fn: 'add') diff --git a/lib/index.coffee b/lib/index.coffee index df12bbe..567a74d 100644 --- a/lib/index.coffee +++ b/lib/index.coffee @@ -1,4 +1,5 @@ base = new (require('./base')) module.exports = require('./api') +module.exports.cli = require('./cli') module.exports.path = base.path.bind(base) diff --git a/readme.md b/readme.md index c4a177c..9ed2dd6 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,7 @@ Simple new project templating A lot of the time you make projects with similar starting templates/boilerplates. There are a number of different standard boilerplates out there (like h5bp), but everyone has their own preferences and tweaks. The goal of sprout is to allow you to write a base template once that is somewhat configurable where it needs to be then initialize the template with the options you choose from the command line or through a javascript API to get a jumpstart on your project. -There is another project called [grunt-init](https://github.com/gruntjs/grunt-init) that does just about the same thing, but after [experimenting with it](https://github.com/carrot/grunt-init-node) a bit, we weren't huge fans of the API or the way that it was set up. +We are aware that the [yeoman project](https://github.com/yeoman/yo) serves a similar purpose, but built this anyway because we needed a project with a very clean and understandable generator API as well as a public javascript API for integration into other projects, and yeoman does not have either of these. ### Installation