-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Franck
committed
Jun 4, 2019
1 parent
a5b5a4c
commit 665303a
Showing
7 changed files
with
55 additions
and
8 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,3 +1,8 @@ | ||
<h1 align="center">readme-cli</h1> | ||
|
||
> Generate README file | ||
## 👤 Author | ||
**Franck Abgrall** | ||
- Twitter 👉[@FranckAbgrall](https://twitter.com/FranckAbgrall) | ||
- Github 👉[@kefranabg](https://twitter.com/kefranabg) |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = () => ({ | ||
type: 'input', | ||
message: 'Enter your Github username', | ||
name: 'authorGithubUsername' | ||
}) |
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,14 @@ | ||
const get = require('lodash/get') | ||
|
||
const { getPackageJson } = require('../utils') | ||
|
||
module.exports = async () => { | ||
const packageJson = await getPackageJson() | ||
|
||
return { | ||
type: 'input', | ||
message: 'Enter your name', | ||
name: 'authorName', | ||
default: get(packageJson, 'author', undefined) | ||
} | ||
} |
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,5 @@ | ||
module.exports = () => ({ | ||
type: 'input', | ||
message: 'Enter your Twitter username', | ||
name: 'authorTwitterUsername' | ||
}) |
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,7 +1,13 @@ | ||
const getProjectNameQuestion = require('./project-name') | ||
const getProjectDescriptionQuestion = require('./project-description') | ||
const getProjectName = require('./project-name') | ||
const getProjectDescription = require('./project-description') | ||
const getAuhtorName = require('./author-name') | ||
const getAuhtorGithub = require('./author-github') | ||
const getAuhtorTwitter = require('./author-twitter') | ||
|
||
module.exports = { | ||
getProjectNameQuestion, | ||
getProjectDescriptionQuestion | ||
getProjectName, | ||
getProjectDescription, | ||
getAuhtorName, | ||
getAuhtorGithub, | ||
getAuhtorTwitter | ||
} |
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,3 +1,9 @@ | ||
<h1 align="center"><%= projectName %></h1> | ||
<% if (projectDescription) { %> | ||
> <%= projectDescription %><% } %> | ||
<% if (authorName) { %> | ||
## 👤 Author | ||
**<%= authorName %>** | ||
<% if (authorTwitterUsername) { %>- Twitter 👉[@<%= authorTwitterUsername %>](https://twitter.com/<%= authorTwitterUsername %>) <% } %> | ||
<% if (authorGithubUsername) { %>- Github 👉[@<%= authorGithubUsername %>](https://twitter.com/<%= authorGithubUsername %>) <% } %> | ||
<% } %> |