From 4f38a545c8f963e318429acb2f3e43f7c9b5d657 Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 17:55:25 -1000 Subject: [PATCH 01/19] feat: fix table styling, add footer --- README.md | 7 ++++++- src/generate/format-contributor.js | 2 +- src/generate/index.js | 15 +++++++++++++-- src/generate/logoSmall.js | 7 +++++++ 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 src/generate/logoSmall.js diff --git a/README.md b/README.md index b099378a..62e5325a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,12 @@ Thanks goes to these wonderful people -
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
+ + + + + + Table generated using all contributors
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
This project follows the diff --git a/src/generate/format-contributor.js b/src/generate/format-contributor.js index c7955f73..67b55eea 100644 --- a/src/generate/format-contributor.js +++ b/src/generate/format-contributor.js @@ -2,7 +2,7 @@ const _ = require('lodash/fp') const formatContributionType = require('./format-contribution-type') const avatarTemplate = _.template( - '<%= name %>', + '<%= name %>', ) const avatarBlockTemplate = _.template( '<%= avatar %>
<%= name %>
', diff --git a/src/generate/index.js b/src/generate/index.js index e5ba8224..e3f2d1fe 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -1,6 +1,7 @@ const _ = require('lodash/fp') const formatBadge = require('./format-badge') const formatContributor = require('./format-contributor') +const logoSmall = require('./logoSmall') const badgeRegex = /\[!\[All Contributors\]\([a-zA-Z0-9\-./_:?=]+\)\]\(#\w+\)/ @@ -36,10 +37,20 @@ function injectListBetweenTags(newContent) { } function formatLine(contributors) { - return `${contributors.join('')}` + return `${contributors.join('')}` +} + +function formatFooter(options) { + // if (!options.attachFooter) { + // return '' + // } + + return ` ${logoSmall} Table generated using all contributors` } function generateContributorsList(options, contributors) { + const tableFooter = formatFooter(options) + return _.flow( _.map(function formatEveryContributor(contributor) { return formatContributor(options, contributor) @@ -48,7 +59,7 @@ function generateContributorsList(options, contributors) { _.map(formatLine), _.join(''), newContent => { - return `\n${newContent}
\n` + return `\n${newContent}${tableFooter}
\n` }, )(contributors) } diff --git a/src/generate/logoSmall.js b/src/generate/logoSmall.js new file mode 100644 index 00000000..95d17255 --- /dev/null +++ b/src/generate/logoSmall.js @@ -0,0 +1,7 @@ +const logoSmall = ` + + + + +` + module.exports = logoSmall From 36236d43452fb807ca95fafbd90a8517107181cd Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:08:08 -1000 Subject: [PATCH 02/19] first --- README.md | 7 +------ assets/logo-small.svg | 0 src/generate/index.js | 5 +++-- src/generate/logoSmall.js | 7 ------- 4 files changed, 4 insertions(+), 15 deletions(-) create mode 100644 assets/logo-small.svg delete mode 100644 src/generate/logoSmall.js diff --git a/README.md b/README.md index 62e5325a..bc748e33 100644 --- a/README.md +++ b/README.md @@ -43,12 +43,7 @@ Thanks goes to these wonderful people - - - - - - Table generated using all contributors
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
+ Table generated using all contributors
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
This project follows the diff --git a/assets/logo-small.svg b/assets/logo-small.svg new file mode 100644 index 00000000..e69de29b diff --git a/src/generate/index.js b/src/generate/index.js index e3f2d1fe..f4ad4fc4 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -1,7 +1,6 @@ const _ = require('lodash/fp') const formatBadge = require('./format-badge') const formatContributor = require('./format-contributor') -const logoSmall = require('./logoSmall') const badgeRegex = /\[!\[All Contributors\]\([a-zA-Z0-9\-./_:?=]+\)\]\(#\w+\)/ @@ -40,12 +39,14 @@ function formatLine(contributors) { return `${contributors.join('')}` } +const LOGO_SMALL_URL = 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/4f38a545c8f963e318429acb2f3e43f7c9b5d657/assets/logo-small.svg' + function formatFooter(options) { // if (!options.attachFooter) { // return '' // } - return ` ${logoSmall} Table generated using all contributors` + return ` Table generated using all contributors` } function generateContributorsList(options, contributors) { diff --git a/src/generate/logoSmall.js b/src/generate/logoSmall.js deleted file mode 100644 index 95d17255..00000000 --- a/src/generate/logoSmall.js +++ /dev/null @@ -1,7 +0,0 @@ -const logoSmall = ` - - - - -` - module.exports = logoSmall From 81583398e34bc6f4512b8d7a1a7abd51abaae25e Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:09:59 -1000 Subject: [PATCH 03/19] wip --- README.md | 2 +- src/generate/index.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc748e33..85f03227 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Thanks goes to these wonderful people - Table generated using all contributors
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
+ Table generated using all contributors
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
This project follows the diff --git a/src/generate/index.js b/src/generate/index.js index f4ad4fc4..24f2d65a 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -39,14 +39,13 @@ function formatLine(contributors) { return `${contributors.join('')}` } -const LOGO_SMALL_URL = 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/4f38a545c8f963e318429acb2f3e43f7c9b5d657/assets/logo-small.svg' - +const LOGO_SMALL_URL = 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/36236d43452fb807ca95fafbd90a8517107181cd/assets/logo-small.svg' function formatFooter(options) { // if (!options.attachFooter) { // return '' // } - return ` Table generated using all contributors` + return ` Table generated using all contributors` } function generateContributorsList(options, contributors) { From 46975ac1b02e188687a30ccad1616d3a10c4391a Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:12:33 -1000 Subject: [PATCH 04/19] wip --- src/generate/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generate/index.js b/src/generate/index.js index 24f2d65a..77c15d76 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -45,7 +45,7 @@ function formatFooter(options) { // return '' // } - return ` Table generated using all contributors` + return ` Table generated using all contributors` } function generateContributorsList(options, contributors) { From 0019e424fc3d193af50222281f9ac5b7a4acbe53 Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:14:18 -1000 Subject: [PATCH 05/19] wip --- src/generate/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generate/index.js b/src/generate/index.js index 77c15d76..0e90cd99 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -59,7 +59,7 @@ function generateContributorsList(options, contributors) { _.map(formatLine), _.join(''), newContent => { - return `\n${newContent}${tableFooter}
\n` + return `\n${newContent}\n${tableFooter}\n
\n` }, )(contributors) } From 9e4599bbae92eced2425403ab739be23df232578 Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:15:09 -1000 Subject: [PATCH 06/19] wip --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 85f03227..7d46d89f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,9 @@ Thanks goes to these wonderful people - Table generated using all contributors
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
+ + +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
Table generated using all contributors
This project follows the From 1b8533af435da9854653492b1327a23a4dbd0a10 Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:16:50 -1000 Subject: [PATCH 07/19] add the image --- assets/logo-small.svg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/logo-small.svg b/assets/logo-small.svg index e69de29b..b8e512af 100644 --- a/assets/logo-small.svg +++ b/assets/logo-small.svg @@ -0,0 +1,6 @@ + + + + + + From 74a74fdbc94bfdb8b5a756cf73bcdb6071a7c3e8 Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:17:53 -1000 Subject: [PATCH 08/19] wip --- README.md | 2 +- src/generate/index.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7d46d89f..9f637244 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Thanks goes to these wonderful people - +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
Table generated using all contributors
Table generated using all contributors
diff --git a/src/generate/index.js b/src/generate/index.js index 0e90cd99..1ea293d4 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -39,13 +39,14 @@ function formatLine(contributors) { return `${contributors.join('')}` } -const LOGO_SMALL_URL = 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/36236d43452fb807ca95fafbd90a8517107181cd/assets/logo-small.svg' + function formatFooter(options) { + const smallLogoURL = 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg' // if (!options.attachFooter) { // return '' // } - return ` Table generated using all contributors` + return ` Table generated using all contributors` } function generateContributorsList(options, contributors) { From 16a05c3adbef572b69efaada6fa03294fc8a9a99 Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:22:19 -1000 Subject: [PATCH 09/19] wip --- README.md | 4 +++- src/generate/index.js | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9f637244..569e4d07 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,9 @@ Thanks goes to these wonderful people - + + +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
Table generated using all contributors
Contributors are recognised by the All Contributor bot, to add your contribution.
diff --git a/src/generate/index.js b/src/generate/index.js index 1ea293d4..57ad0fae 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -42,11 +42,14 @@ function formatLine(contributors) { function formatFooter(options) { const smallLogoURL = 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg' - // if (!options.attachFooter) { + const linkToBotAdd = 'https://all-contributors.js.org/docs/en/bot/usage' + // if (!options.attachFooter) { // return '' // } - return ` Table generated using all contributors` + return ` + Contributors are recognised by the All Contributor bot, to add your contribution. + ` } function generateContributorsList(options, contributors) { From 02f2c6b9c3a1e94e7d3718fec822d4adfac84d9f Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:28:08 -1000 Subject: [PATCH 10/19] wip --- .all-contributorsrc | 1 + README.md | 2 +- src/generate/index.js | 9 +++++---- src/init/prompt.js | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 71aa3366..abc17991 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -5,6 +5,7 @@ "repoType": "github", "commit": false, "contributorsPerLine": 6, + "linkToUsage": true, "contributors": [ { "login": "jfmengels", diff --git a/README.md b/README.md index 569e4d07..36e0bc05 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Thanks goes to these wonderful people - +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
Contributors are recognised by the All Contributor bot, to add your contribution. Table generated with All Contributors, add your contributor
diff --git a/src/generate/index.js b/src/generate/index.js index 57ad0fae..617c221e 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -41,14 +41,15 @@ function formatLine(contributors) { function formatFooter(options) { + if (!options.linkToUsage) { + return '' + } const smallLogoURL = 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg' + const linkToAllContributors = 'https://all-contributors.js.org' const linkToBotAdd = 'https://all-contributors.js.org/docs/en/bot/usage' - // if (!options.attachFooter) { - // return '' - // } return ` - Contributors are recognised by the All Contributor bot, to add your contribution. + Table generated with All Contributors, add your contributor ` } diff --git a/src/init/prompt.js b/src/init/prompt.js index c29410d1..59bfa770 100644 --- a/src/init/prompt.js +++ b/src/init/prompt.js @@ -103,6 +103,7 @@ module.exports = function prompt() { commit: answers.commit, contributors: [], contributorsPerLine: 7, + linkToUsage: true, }, contributorFile: answers.contributorFile, badgeFile: answers.badgeFile, From e48256b89bb06378515c72bbc31a65827c4ea44e Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 6 Feb 2019 18:30:41 -1000 Subject: [PATCH 11/19] wip --- README.md | 2 +- src/generate/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36e0bc05..a7349295 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Thanks goes to these wonderful people - +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
Table generated with All Contributors, add your contributor Add your contribution
diff --git a/src/generate/index.js b/src/generate/index.js index 617c221e..e02b093c 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -49,7 +49,7 @@ function formatFooter(options) { const linkToBotAdd = 'https://all-contributors.js.org/docs/en/bot/usage' return ` - Table generated with All Contributors, add your contributor + Add your contribution ` } From d0157d0c1757de12bd979f2c65682b0dcf9e0662 Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Fri, 8 Feb 2019 07:23:25 -1000 Subject: [PATCH 12/19] wip --- README.md | 2 +- src/generate/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7349295..a15295ec 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Thanks goes to these wonderful people - +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
diff --git a/src/generate/index.js b/src/generate/index.js index e02b093c..7a75a8c0 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -36,7 +36,7 @@ function injectListBetweenTags(newContent) { } function formatLine(contributors) { - return `` + return `` } From 9d3b660efcfc35bedb3b4eff0e4cf619b71224ee Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Fri, 8 Feb 2019 07:24:01 -1000 Subject: [PATCH 13/19] size --- README.md | 2 +- src/generate/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a15295ec..ee36aaee 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Thanks goes to these wonderful people
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
Add your contribution
${contributors.join('')}${contributors.join('')}
- +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
Add your contribution Add your contribution
diff --git a/src/generate/index.js b/src/generate/index.js index 7a75a8c0..a3b76ac3 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -49,7 +49,7 @@ function formatFooter(options) { const linkToBotAdd = 'https://all-contributors.js.org/docs/en/bot/usage' return ` - Add your contribution + Add your contribution ` } From ba83147de0fa007e1fe392882b8a3ec796baba08 Mon Sep 17 00:00:00 2001 From: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> Date: Wed, 14 Sep 2022 00:37:04 +0800 Subject: [PATCH 14/19] cleanups --- .../__tests__/__snapshots__/index.js.snap | 6 ++++++ src/generate/index.js | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index 15d4d74b..bead1324 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -18,6 +18,9 @@ These people contributed to the project: Jeroen Engels is awesome! + + + @@ -52,6 +55,9 @@ These people contributed to the project: Kent C. Dodds is awesome! + + + diff --git a/src/generate/index.js b/src/generate/index.js index 49cafde7..217628a1 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -38,19 +38,20 @@ function injectListBetweenTags(newContent) { } function formatLine(contributors) { - return `${contributors.join('')}` + return `${contributors.join( + '\n ', + )}` } - function formatFooter(options) { if (!options.linkToUsage) { return '' } - const smallLogoURL = 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg' - const linkToAllContributors = 'https://all-contributors.js.org' + const smallLogoURL = + 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg' const linkToBotAdd = 'https://all-contributors.js.org/docs/en/bot/usage' - return ` + return ` Add your contribution ` } @@ -67,11 +68,11 @@ function generateContributorsList(options, contributors) { _.map(function formatEveryContributor(contributor) { return formatContributor(options, contributor) }), - _.chunk(contributorsPerLine), + _.chunk(options.contributorsPerLine), _.map(formatLine), _.join('\n \n \n '), newContent => { - return `\n${newContent}\n${tableFooter}\n
\n` + return `\n\n \n \n ${newContent}\n \n \n \n ${tableFooter}\n \n
\n\n` }, )(contributors) } From 35b3af53d8bb1e753d72a6186b5b641b7cabd4d5 Mon Sep 17 00:00:00 2001 From: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> Date: Wed, 14 Sep 2022 02:02:12 +0800 Subject: [PATCH 15/19] add some tests --- .../__tests__/__snapshots__/index.js.snap | 80 +++++++++++++++++++ src/generate/__tests__/index.js | 26 ++++++ src/generate/index.js | 4 +- 3 files changed, 107 insertions(+), 3 deletions(-) diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index bead1324..50a0bb6f 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -31,6 +31,43 @@ These people contributed to the project: Thanks a lot everyone!" `; +exports[`replace the content between the ALL-CONTRIBUTORS-LIST tags by a table of contributors with linkToUsage 1`] = ` +"# project + +Description + +## Contributors +These people contributed to the project: + + + + + + + + + + + + + + + + +
Kent C. Dodds is awesome!Divjot Singh is awesome!Jeroen Engels is awesome!
+ + Add your contributions + +
+ + + + + + +Thanks a lot everyone!" +`; + exports[`split contributors into multiples lines when there are too many 1`] = ` "# project @@ -67,3 +104,46 @@ These people contributed to the project: Thanks a lot everyone!" `; + +exports[`split contributors into multiples lines when there are too many with linkToUsage 1`] = ` +"# project + +Description + +## Contributors +These people contributed to the project: + + + + + + + + + + + + + + + + + + + + + + +
Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!
Kent C. Dodds is awesome!Kent C. Dodds is awesome!
+ + Add your contributions + +
+ + + + + + +Thanks a lot everyone!" +`; diff --git a/src/generate/__tests__/index.js b/src/generate/__tests__/index.js index ece35d58..cff3f7c1 100644 --- a/src/generate/__tests__/index.js +++ b/src/generate/__tests__/index.js @@ -43,6 +43,15 @@ test('replace the content between the ALL-CONTRIBUTORS-LIST tags by a table of c expect(result).toMatchSnapshot() }) +test('replace the content between the ALL-CONTRIBUTORS-LIST tags by a table of contributors with linkToUsage', () => { + const {kentcdodds, bogas04} = contributors + const {options, jfmengels, content} = fixtures() + const contributorList = [kentcdodds, bogas04, jfmengels] + const result = generate(Object.assign(options, { linkToUsage: true }), contributorList, content) + + expect(result).toMatchSnapshot() +}) + test('split contributors into multiples lines when there are too many', () => { const {kentcdodds} = contributors const {options, content} = fixtures() @@ -60,6 +69,23 @@ test('split contributors into multiples lines when there are too many', () => { expect(result).toMatchSnapshot() }) +test('split contributors into multiples lines when there are too many with linkToUsage', () => { + const {kentcdodds} = contributors + const {options, content} = fixtures() + const contributorList = [ + kentcdodds, + kentcdodds, + kentcdodds, + kentcdodds, + kentcdodds, + kentcdodds, + kentcdodds, + ] + const result = generate(Object.assign(options, { linkToUsage: true }), contributorList, content) + + expect(result).toMatchSnapshot() +}) + test('sorts the list of contributors if contributorsSortAlphabetically=true', () => { const {kentcdodds, bogas04} = contributors const {options, jfmengels, content} = fixtures() diff --git a/src/generate/index.js b/src/generate/index.js index 217628a1..8b2132a7 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -51,9 +51,7 @@ function formatFooter(options) { 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg' const linkToBotAdd = 'https://all-contributors.js.org/docs/en/bot/usage' - return ` - Add your contribution - ` + return `\n \n \n Add your contributions\n \n \n ` } function generateContributorsList(options, contributors) { From bba1d3acea438757cd6c4c9a04009d30eb49a125 Mon Sep 17 00:00:00 2001 From: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> Date: Tue, 27 Sep 2022 23:55:51 +0800 Subject: [PATCH 16/19] chore: update snapshots --- .../__tests__/__snapshots__/index.js.snap | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index 50a0bb6f..b0261602 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -44,16 +44,16 @@ These people contributed to the project: - - - + + + - @@ -131,9 +131,9 @@ These people contributed to the project: - From f5f642e9ad10dac0c7ec1f3c23866d0462e01c9d Mon Sep 17 00:00:00 2001 From: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> Date: Wed, 28 Sep 2022 00:15:08 +0800 Subject: [PATCH 17/19] fix: cleanup footer format --- src/generate/__tests__/__snapshots__/index.js.snap | 4 ++-- src/generate/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index b0261602..7278f002 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -51,7 +51,7 @@ These people contributed to the project: - - \n \n ` + return `\n \n ` } function generateContributorsList(options, contributors) { From fae9b431ea0ffc579bff0a43e60ecd9112351571 Mon Sep 17 00:00:00 2001 From: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> Date: Wed, 28 Sep 2022 01:09:24 +0800 Subject: [PATCH 18/19] update readme --- README.md | 115 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 91 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 5ea1154e..801696cb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ -- [ all-contributors-cli ](#all-contributors-cli) + +- [ + all-contributors-cli +](#all-contributors-cli) - [The problem](#the-problem) - [This solution](#this-solution) - [Using the all-contributors-cli](#using-the-all-contributors-cli) @@ -76,39 +79,103 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - -
Kent C. Dodds is awesome!Divjot Singh is awesome!Jeroen Engels is awesome!Kent C. Dodds is awesome!Divjot Singh is awesome!Jeroen Engels is awesome!
- - Add your contributions + + + Add your contributions
- - Add your contributions + + + Add your contributions
+ Add your contributions @@ -131,7 +131,7 @@ These people contributed to the project:
+ Add your contributions diff --git a/src/generate/index.js b/src/generate/index.js index 8b2132a7..dbd951dd 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -51,7 +51,7 @@ function formatFooter(options) { 'https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg' const linkToBotAdd = 'https://all-contributors.js.org/docs/en/bot/usage' - return `
\n \n Add your contributions\n \n
\n \n Add your contributions\n \n
- - + + +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»
Add your contribution
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - + + + + + + + + + + + + + +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»
Nick Schonning
Nick Schonning

πŸ’»
Cezar Augusto
Cezar Augusto

πŸ“–
Jeppe Reinhold
Jeppe Reinhold

πŸ’»
Rachel M. Carmena
Rachel M. Carmena

πŸ’»
simon3000
simon3000

⚠️
SnOβ‚‚WMaN
SnOβ‚‚WMaN

πŸ’»

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€
Fabrizio
Fabrizio

πŸ› πŸ’»
kharaone
kharaone

πŸ’»
Marcelo Alves
Marcelo Alves

πŸ’» ⚠️
Anand Chowdhary
Anand Chowdhary

⚠️ πŸ› πŸ’»
Nicolas Goutay
Nicolas Goutay

πŸ’»
Tyler Krupicka
Tyler Krupicka

πŸ’» ⚠️

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️
Stefano Moia
Stefano Moia

πŸ’»
IlaΓ― Deutel
IlaΓ― Deutel

πŸ“¦
Justin Dalrymple
Justin Dalrymple

πŸ’»
Piotr StΔ™pniewski
Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️
Gregor Martynus
Gregor Martynus

πŸ‘€ πŸ’¬
Jeff Wen
Jeff Wen

πŸ‘€

Darek Kay

πŸ’» ⚠️

LaChapeliere

πŸ’»

SirWindfield

πŸ’»

G r e y

πŸ›‘οΈ

Lucas Cimon

πŸ“–

Josh Goldberg

πŸ›
PaweΕ‚ Kowalski
PaweΕ‚ Kowalski

πŸ’»
Markus LΓΆning
Markus LΓΆning

πŸ’»
David Anson
David Anson

πŸ›
Jeroen Claassens
Jeroen Claassens

πŸ’»
Erek Speed
Erek Speed

πŸ’»
Shai Reznik
Shai Reznik

πŸ› πŸ’» ⚠️

Angel Aviel Domaoan

πŸ’» πŸ‘€ πŸ“–
Darek Kay
Darek Kay

πŸ’» ⚠️
LaChapeliere
LaChapeliere

πŸ’»
SirWindfield
SirWindfield

πŸ’»
G r e y
G r e y

πŸ›‘οΈ
Lucas Cimon
Lucas Cimon

πŸ“–
Josh Goldberg
Josh Goldberg

πŸ›
Angel Aviel Domaoan
Angel Aviel Domaoan

πŸ’» πŸ‘€ πŸ“–
+ + Add your contributions + +
From 78ba2b3a8fa78bafddbcf710ceb19f12d7efaa6f Mon Sep 17 00:00:00 2001 From: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:20:12 +0800 Subject: [PATCH 19/19] update prompt --- src/init/prompt.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/init/prompt.js b/src/init/prompt.js index a444536e..c67fd8c3 100644 --- a/src/init/prompt.js +++ b/src/init/prompt.js @@ -86,6 +86,12 @@ const questions = [ choices: Object.values(conventions), default: 'angular', }, + { + type: 'confirm', + name: 'linkToUsage', + message: 'Do you want to add a footer with link to usage?', + default: true, + }, ] const uniqueFiles = _.flow(_.compact, _.uniq) @@ -113,7 +119,7 @@ module.exports = function prompt() { commitConvention: answers.commitConvention, contributors: [], contributorsPerLine: 7, - linkToUsage: true, + linkToUsage: answers.linkToUsage, }, contributorFile: answers.contributorFile, badgeFile: answers.badgeFile,