Skip to content

Commit

Permalink
Merge pull request #17 from shuvalov-anton/contributor-guides
Browse files Browse the repository at this point in the history
Few words for plugin creators
  • Loading branch information
A committed May 14, 2015
2 parents 14091b1 + f07e40b commit e924fb8
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,34 @@ function plugin(text, options) {
To support `String.prototype` methods as transformation functions, `this` value
is equal to the `text`.

## Few words for plugin creatorsm

## 'locale' option consistence
:+1::tada: First off, you are awesome and thanks for taking the time
to contribute! :tada::+1:

### Testability

As far as we want to go beyond monolythic typographic engines, then
we (as ecosystem) need to have small atomic 100% covered with tests plugins.
That’s why please have `index.js` and `test.js` in the repository
and `.travis.yml` to validate pull-requests. Badges about npm version,
passing tests and tests coverage are optionable, but preferred.

Give a chance to [npm scripts][npmscripts] as cross-platform tool
for automatization.

### README

Everyone will read README, and only ones—sources. Please include in your readme
file following sections: package name, description, installation instructions,
usage section with spec from tests and license note. License note is important
for enterprise users. We want to create ecosystem, so it’s reasonable to have
a link to textr in README’s plugins, good place for it is in the top,
maybe in the short description.

[npmscripts]: https://docs.npmjs.com/misc/scripts

### 'locale' option consistence

tl;dr: Use [ISO 639][ISO] and rely on locale codes like these: `en-uk`,
`en-us`, `zh-Hans`, `ru`, `da`, `sv`—regular values for `lang` attribute.
Expand Down

0 comments on commit e924fb8

Please sign in to comment.