Skip to content

Commit ad04e43

Browse files
authored
build(release): bump to v1.1.0 (#7)
* chore(package): update dependencies * docs(readme): add Greenkeeper badge * feat(report): add linked index of terms #1 * ci(dependencies): enable greenkeeper Automate dependency drift updates. #1,#5 * style(lint): fix eslint errors in tests #1,#5 * style(lexicon): format file to fix rendering * style(template): add collapsing details by default * build(release): fix semantic-release config Prune unused template files. Output CLI stuff to the console.
1 parent ae8dbf6 commit ad04e43

16 files changed

Lines changed: 100 additions & 175 deletions

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ deploy:
2020
provider: script
2121
skip_cleanup: true
2222
script:
23-
- npm run release
2423
- npx travis-deploy-once "npx semantic-release"

CODE_OF_CONDUCT.md

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,72 @@
1+
[![Generator Community Repo][product-repo-logo-image]][product-repo-url]
2+
13
# Contributor Covenant Code of Conduct
24

35
## Our Pledge
46

5-
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to making participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, gender identity and expression, level of experience,
9-
nationality, personal appearance, race, religion, or sexual identity and
7+
![Pledge][icon-pledge-image] In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and
108
orientation.
119

1210
## Our Standards
1311

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
12+
![Equality][icon-equality-image] Contributing to open source software should be gratifying, rewarding, and fun. Open source software depends on a transparent and respectful community of people. Therefore, problematic behavior will be addressed swiftly, politely, and publicly, in order to send a signal to potential contributors that such behavior isn't typical or tolerated.
13+
14+
### Positive behavior
15+
16+
![Good decisions][icon-good-decision-image] Examples of behavior that contribute to creating a positive environment include:
1617

1718
* Using welcoming and inclusive language
1819
* Being respectful of differing viewpoints and experiences
1920
* Gracefully accepting constructive criticism
2021
* Focusing on what is best for the community
2122
* Showing empathy towards other community members
2223

23-
Examples of unacceptable behavior by participants include:
24+
### Unacceptable behavior
2425

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
26+
![Bad decisions][icon-bad-decision-image] Examples of unacceptable participant behavior include:
27+
28+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
2729
* Trolling, insulting/derogatory comments, and personal or political attacks
2830
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
31+
* Doxing, i.e., publishing others' private information, such as a physical or electronic address, without explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a professional setting
3333

3434
## Our Responsibilities
3535

36-
Project maintainers are responsible for clarifying the standards of acceptable
36+
![Investigation][icon-justice-image] Project maintainers are responsible for clarifying the standards of acceptable
3737
behavior and are expected to take appropriate and fair corrective action in
3838
response to any instances of unacceptable behavior.
3939

40-
Project maintainers have the right and responsibility to remove, edit, or
41-
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
44-
threatening, offensive, or harmful.
40+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
4541

4642
## Scope
4743

48-
This Code of Conduct applies both within project spaces and in public spaces
49-
when an individual is representing the project or its community. Examples of
50-
representing a project or community include using an official project e-mail
51-
address, posting via an official social media account, or acting as an appointed
52-
representative at an online or offline event. Representation of a project may be
53-
further defined and clarified by project maintainers.
44+
![Scope][icon-globe-image] This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
5445

5546
## Enforcement
5647

57-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by [contacting the project team][email]. All
59-
complaints will be reviewed and investigated and will result in a response that
60-
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
48+
![Enforcement][icon-badge-image] Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by **[contacting the team][team-email-mailto]**. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
6349

64-
Project maintainers who do not follow or enforce the Code of Conduct in good
65-
faith may face temporary or permanent repercussions as determined by other
66-
members of the project's leadership.
50+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
6751

6852
## Attribution
6953

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72-
73-
[email]: greg@swindle.net
74-
[homepage]: https://www.contributor-covenant.org
54+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version].
55+
56+
---
57+
58+
Graphic art by [icons8](https://icons8.com/).
59+
60+
[homepage]: http://contributor-covenant.org
61+
[icon-bad-decision-image]: ./docs/img/icons8/icon-bad-decision-50.png
62+
[icon-badge-image]: ./docs/img/icons8/icon-badge-50.png
63+
[icon-equality-image]: ./docs/img/icons8/icon-equality-50.png
64+
[icon-globe-image]: ./docs/img/icons8/icon-globe-50.png
65+
[icon-good-decision-image]: ./docs/img/icons8/icon-good-decision-50.png
66+
[icon-justice-image]: ./docs/img/icons8/icon-justice-50.png
67+
[icon-pledge-image]: ./docs/img/icons8/icon-pledge-50.png
68+
[product-repo-logo-image]: ./docs/img/logo-commonalaxy.png
69+
[product-repo-url]: https://github.com/commonality/common-vocabulary
70+
[team-email-mailto]: mailto:greg@swindle.net?Subject=%5Bcommon-vocabulary%5D%20Code%20of%20conduct%20concern
71+
[team-issues-url]: https://github.com/commonality/common-vocabulary/issues/new
72+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@
12571257
[conventional-commits-url]: https://conventionalcommits.org
12581258
[coolors-palette-url]: https://coolors.co/cfdbd5-e8eddf-f5cb5c-242423-333533
12591259
[eslint-logo-image]: ./docs/img/logo-eslint.png
1260-
[eslint-rules-table-url]: ./ESLINT_RULES.md
1260+
[eslint-rules-table-url]: .github/eslint-rules-table.md
12611261
[eslint-url]: https://eslint.org
12621262
[force-with-lease-url]: https://developer.atlassian.com/blog/2015/04/force-with-lease/
12631263
[fossa-image-large]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Forganization%2Frepo-name.svg?type=large

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,17 @@ Contributions in the form of GitHub pull requests are welcome. Before embarking
110110
[![Greenkeeper badge](https://badges.greenkeeper.io/commonality/common-vocabulary.svg?style=flat-square)](https://greenkeeper.io/)
111111
[![README doc score][readme-score-img]][readme-score-url]
112112

113+
Graphic art by [icons8](https://icons8.com/).
114+
113115
<!-- ⛔️ 📝 NOTE: PLEASE ALPHABETIZE LINK REFERENCES. 📝 ⛔️ -->
114116

115117
[appveyor-image]: https://img.shields.io/appveyor/ci/gregswindle/common-vocabulary.svg?style=flat-square&logo=appveyor
116118
[appveyor-url]: https://ci.appveyor.com/project/gregswindle/common-vocabulary
117119
[author-url]: https://github.com/commonality
120+
[bithound-dev-image]: https://img.shields.io/bithound/devDependencies/github/commonality/common-vocabulary.svg?style=flat-square
121+
[bithound-dev-url]: https://www.bithound.io/github/commonality/common-vocabulary/master/dependencies/npm
122+
[bithound-image]: https://img.shields.io/bithound/dependencies/github/commonality/common-vocabulary.svg?style=flat-square
123+
[bithound-url]: https://www.bithound.io/github/commonality/common-vocabulary/master/dependencies/npm
118124
[changelog-url]: ./CHANGELOG.md
119125
[codacy-image]: https://img.shields.io/codacy/grade/58a7e841538a49cc8a5d35eba00e6c07.svg?style=flat-square
120126
[codacy-url]: https://www.codacy.com/app/commonality/common-vocabulary?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=commonality/common-vocabulary&amp;utm_campaign=Badge_Grade
@@ -124,10 +130,6 @@ Contributions in the form of GitHub pull requests are welcome. Before embarking
124130
[contributing-url]: ./CONTRIBUTING.md
125131
[coveralls-image]: https://img.shields.io/coveralls/github/commonality/common-vocabulary.svg?style=flat-square
126132
[coveralls-url]: https://coveralls.io/r/commonality/common-vocabulary
127-
[bithound-image]: https://img.shields.io/bithound/dependencies/github/commonality/common-vocabulary.svg?style=flat-square
128-
[bithound-url]: https://www.bithound.io/github/commonality/common-vocabulary/master/dependencies/npm
129-
[bithound-dev-image]: https://img.shields.io/bithound/devDependencies/github/commonality/common-vocabulary.svg?style=flat-square
130-
[bithound-dev-url]: https://www.bithound.io/github/commonality/common-vocabulary/master/dependencies/npm
131133
[fossa-image]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcommonality%2Fcommon-vocabulary.svg?type=shield&style=flat-square
132134
[fossa-url]: https://app.fossa.io/projects/git%2Bgithub.com%2Fcommonality%2Fcommon-vocabulary?ref=badge_shield
133135
[issues-new-defect-image]: https://img.shields.io/badge/report---defect---lightgrey.svg?style=for-the-badge&label=report+a

docs/common-vocabulary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Common Vocabulary
22

3-
> Generated on Thu Feb 08 2018.
3+
> Generated on Fri Feb 09 2018.
44
55
## Index of terms
66

lib/adaptor/conventional-commits-adaptor.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ const LexicalEntry = require('../lexical-entry')
44
class ConventionalCommitsAdaptor {
55
constructor () {
66
this.types = conventionalCommitTypes.types
7+
this.uri =
8+
'https://raw.githubusercontent.com' +
9+
'/commitizen/conventional-commit-types/master' +
10+
'/index.json#types'
711
}
812

913
adapt () {
@@ -12,7 +16,7 @@ class ConventionalCommitsAdaptor {
1216
'dd': this.types[type].description,
1317
'dt': type,
1418
'meta': {
15-
'$ref': `https://raw.githubusercontent.com/commitizen/conventional-commit-types/master/index.json#types.${type}`
19+
'$ref': `${this.uri}/${type}`
1620
},
1721
'title': this.types[type].title
1822
}))

lib/cli/index.js

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ const path = require('path')
77

88
const msg = `
99
Usage
10-
$ common-vocabulary [input]
11-
12-
Synopsis
13-
add <term> <definition> [<category>]
14-
Appends a new lexical entry with the given
15-
definition to the lexicon object. Returns the lexicon object.
10+
$ common-vocabulary [command]
1611
12+
Commands
1713
clear
1814
Removes all lexical entrys from the lexicon object.
1915
16+
define <term> <definition> [<category>]
17+
Appends a new lexical entry with the given
18+
definition to the lexicon object. Returns the lexicon object.
19+
2020
definitions
2121
Returns a new Iterator object that contains the lexical
2222
entries for all terms.
@@ -34,16 +34,24 @@ Synopsis
3434
Sets the name of the lexicon. If the name is omitted, it
3535
returns the Common Vocabulary's name.
3636
37+
report
38+
Serializes the lexicon as GitHub-flavored Markdown as
39+
saves it to --output.
40+
3741
terms
3842
Is the same function as the definitions.
3943
44+
toString
45+
Serialize the lexicon as JSON and send to stdout.
46+
4047
Options
41-
--output, -o Path to definition file. [Default: false]
48+
--output, -o Path to definition file.
49+
[Default: ./docs/common-vocabulary.md]
4250
4351
Examples
4452
$ common-vocabulary
45-
unicorns
46-
$ common-vocabulary add fo "bario"
53+
# => generates ./docs/common-vocabulary.md
54+
$ common-vocabulary has foo-bar
4755
unicorns & rainbows
4856
`
4957

@@ -57,14 +65,30 @@ const options = {
5765
}
5866
}
5967

60-
const main = () => {
61-
const commonVocabulary = new CommonVocabulary()
68+
const decorator = {
69+
forReports (cli, commonVocabulary) {
70+
commonVocabulary.report = () => {
71+
const destination = cli.flags.output || options.flags.output.default
72+
73+
const lexicon = commonVocabulary.toHtml()
74+
const lexiconFactory = new LexiconFactory()
75+
lexiconFactory.report(destination, lexicon)
76+
}
77+
},
78+
79+
forStdout (cli, commonVocabulary) {
80+
const method = cli.input.shift() || 'report'
81+
// eslint-disable-next-line no-console
82+
console.log(commonVocabulary[method](cli.input))
83+
}
84+
}
85+
86+
const init = () => {
6287
const cli = meow(msg, options)
63-
const method = cli.input.shift() || 'toHtml'
64-
const report = commonVocabulary[method](cli.input)
65-
const destination = cli.flags.output || options.flags.output.default
66-
const lexiconFactory = new LexiconFactory()
67-
lexiconFactory.report(destination, report)
88+
const commonVocabulary = new CommonVocabulary()
89+
90+
decorator.forReports(cli, commonVocabulary)
91+
decorator.forStdout(cli, commonVocabulary)
6892
}
6993

70-
main()
94+
init()

lib/cli/prep-dirs.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

lib/common-vocabulary.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const ConventionalCommitsAdaptor = require('./adaptor/conventional-commits-adaptor')
1+
const ConventionalCommitsAdaptor =
2+
require('./adaptor/conventional-commits-adaptor')
23
const LexicalEntry = require('./lexical-entry')
34
const ejs = require('ejs')
45
const fs = require('fs-extra')

lib/templates/en/dl-template.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)