This repository has been archived by the owner on Mar 27, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add readme template for component-create(1) with more boilerplate
- Loading branch information
Showing
5 changed files
with
43 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
"debug": "*" | ||
}, | ||
"devDependencies": { | ||
"minstache": "0.0.1", | ||
"mocha": "*", | ||
"should": "*" | ||
}, | ||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = function anonymous(obj) { | ||
|
||
function escape(html) { | ||
return String(html) | ||
.replace(/&/g, '&') | ||
.replace(/"/g, '"') | ||
.replace(/</g, '<') | ||
.replace(/>/g, '>'); | ||
}; | ||
|
||
function section(obj, prop, negate, str) { | ||
var val = obj[prop]; | ||
if ('function' == typeof val) return val.call(obj, str); | ||
if (negate) val = !val; | ||
if (val) return str; | ||
return ''; | ||
}; | ||
|
||
return "\n# " + escape(obj.name) + "\n\n " + escape(obj.desc) + "\n\n## Installation\n\n $ component install " + escape(obj.repo) + "\n\n## API\n\n \n\n## License\n\n MIT\n" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
# {name} | ||
|
||
{desc} | ||
|
||
## Installation | ||
|
||
$ component install {repo} | ||
|
||
## API | ||
|
||
|
||
|
||
## License | ||
|
||
MIT |