Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allows overriding fetcher repo recipes
- addresses #374 with a simple config override - this allows users to override the fetch repository from their config/application.{js,coffee} like so: ``` fetcher: { recipeRepo: "https://github.com/davemo/fetcher-recipes" } ```
- Loading branch information
Showing
3 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
grunt = require('./../requires-grunt').require() | ||
fetcher = require('fetcher') | ||
|
||
module.exports = (recipes = [], cb) -> | ||
return displayHelp() if recipes.length == 0 | ||
fetcher recipes, {recipeRepo: "https://github.com/linemanjs/fetcher-recipes.git"}, (er) -> | ||
module.exports = (recipes = [], recipeRepo = "https://github.com/linemanjs/fetcher-recipes", cb) -> | ||
return displayHelp(recipeRepo) if recipes.length == 0 | ||
fetcher recipes, {recipeRepo}, (er) -> | ||
grunt.warn(er) if er? | ||
return cb?(er) if er? | ||
cb?(null) | ||
|
||
displayHelp = -> | ||
displayHelp = (recipeRepo) -> | ||
grunt.warn """ | ||
Usage: `lineman fetch <recipe_name>` | ||
For a list of available recipes, see: | ||
https://github.com/linemanjs/fetcher-recipes/tree/master/recipes | ||
#{recipeRepo}/tree/master/recipes | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters