Skip to content

Commit c5d94d6

Browse files
author
Charlike Mike Reagent
committed
major(refactor): expose API, update repo template, simplify CLI
add support in CLI for linting from stdin Signed-off-by: Charlike Mike Reagent <olsten.larck@gmail.com>
1 parent 55700fb commit c5d94d6

File tree

14 files changed

+1738
-838
lines changed

14 files changed

+1738
-838
lines changed

.circleci/config.yml

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,67 @@
11
version: 2
22

3-
defaults: &defaults
3+
node8: &node8
44
working_directory: ~/xaxa
55
docker:
66
- image: circleci/node:8
77

8+
node10: &node10
9+
working_directory: ~/xaxa
10+
docker:
11+
- image: circleci/node:10
12+
813
restore_modules_cache: &restore_modules_cache
914
restore_cache:
1015
keys:
1116
- xaxa-{{ checksum "yarn.lock" }}
1217
# fallback to using the latest cache if no exact match is found
1318
- xaxa-
1419

20+
jobinstall: &jobinstall
21+
steps:
22+
- checkout
23+
- *restore_modules_cache
24+
- run:
25+
name: Installing Dependencies
26+
command: yarn install
27+
- save_cache:
28+
key: xaxa-{{ checksum "yarn.lock" }}
29+
paths: node_modules
30+
- run:
31+
name: Remove node_modules to cleanup workspace
32+
command: rm -rf node_modules
33+
34+
jobtest: &jobtest
35+
steps:
36+
- checkout
37+
- *restore_modules_cache
38+
- run:
39+
name: Running tests and checks
40+
command: yarn test
41+
- run:
42+
name: Sending test coverage to CodeCov
43+
command: bash <(curl -s https://codecov.io/bash)
44+
1545

1646
jobs:
17-
install:
18-
<<: *defaults
19-
steps:
20-
- checkout
21-
- *restore_modules_cache
22-
- run:
23-
name: Installing dependencies
24-
command: yarn install
25-
- save_cache:
26-
key: xaxa-{{ checksum "yarn.lock" }}
27-
paths: node_modules
28-
- run:
29-
name: Remove node_modules to cleanup workspace
30-
command: rm -rf node_modules
47+
install-on-node8:
48+
<<: *node8
49+
<<: *jobinstall
3150

32-
test:
33-
<<: *defaults
34-
steps:
35-
- checkout
36-
- *restore_modules_cache
37-
- run:
38-
name: Running tests and checks
39-
command: yarn test
40-
- run:
41-
name: Sending test coverage to CodeCov
42-
command: bash <(curl -s https://codecov.io/bash)
51+
test-on-node8:
52+
<<: *node8
53+
<<: *jobtest
54+
55+
install-on-node10:
56+
<<: *node10
57+
<<: *jobinstall
58+
59+
test-on-node10:
60+
<<: *node10
61+
<<: *jobtest
4362

4463
release:
45-
<<: *defaults
64+
<<: *node10
4665
steps:
4766
- checkout
4867
- *restore_modules_cache
@@ -54,13 +73,18 @@ workflows:
5473
version: 2
5574
automated:
5675
jobs:
57-
- install
58-
- test:
76+
- install-on-node8
77+
- test-on-node8:
78+
requires:
79+
- install-on-node8
80+
- install-on-node10
81+
- test-on-node10:
5982
requires:
60-
- install
83+
- install-on-node10
6184
- release:
6285
requires:
63-
- test
86+
- test-on-node8
87+
- test-on-node10
6488
filters:
6589
branches:
6690
only: master

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ node_modules
22
coverage
33
.nyc_output
44
.eslintcache
5+
dist
6+
xaxa
57

68
# npm >=5 lock file (& shrinkwrap), we use Yarn!
79
package-lock.json

.verb.md

Lines changed: 51 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# xaxa [![npm version][npmv-img]][npmv-url] [![github release][ghrelease-img]][ghrelease-url] [![License][license-img]][license-url]
1+
# {%= name %} [![npm version][npmv-img]][npmv-url] [![github release][ghrelease-img]][ghrelease-url] [![License][license-img]][license-url] [![Semantically Released][new-release-img]][new-release-url]
22

33
<p align="center">
44
<a href="https://github.com/olstenlarck/xaxa">
@@ -9,115 +9,124 @@
99

1010
> :star2: Zero-config linting, powered by few amazing unicorns :unicorn:, [AirBnB](https://github.com/airbnb/javascript) :revolving_hearts: & [Prettier](https://prettier.io/) :tada:
1111
12+
<div id="thetop"></div>
13+
1214
[![XAXA code style][codestyle-img]][codestyle-url]
13-
[![CircleCI linux build][linuxbuild-img]][linuxbuild-url]
14-
[![CodeCov coverage status][codecoverage-img]][codecoverage-url]
15-
[![DavidDM dependency status][dependencies-img]][dependencies-url]
16-
[![Renovate App Status][renovateapp-img]][renovateapp-url]
17-
[![Make A Pull Request][prs-welcome-img]][prs-welcome-url]
15+
[![CircleCI linux build][linuxbuild-img]][linuxbuild-url]
16+
[![CodeCov coverage status][codecoverage-img]][codecoverage-url]
17+
[![DavidDM dependency status][dependencies-img]][dependencies-url]
18+
[![Renovate App Status][renovateapp-img]][renovateapp-url]
19+
[![Make A Pull Request][prs-welcome-img]][prs-welcome-url]
1820

1921
If you have any _how-to_ kind of questions, please read the [Contributing Guide](./CONTRIBUTING.md) and [Code of Conduct](./CODE_OF_CONDUCT.md) documents.
2022
For bugs reports and feature requests, [please create an issue][open-issue-url] or ping [@tunnckoCore](https://twitter.com/tunnckoCore) at Twitter.
2123

2224
[![Conventional Commits][ccommits-img]][ccommits-url]
23-
[![PayPal Author Support][paypal-donate-img]][paypal-donate-url]
24-
[![Share Love Tweet][share-love-img]][share-love-url]
25-
[![NPM Downloads Weekly][downloads-weekly-img]][npmv-url]
26-
[![NPM Downloads Monthly][downloads-monthly-img]][npmv-url]
27-
[![NPM Downloads Total][downloads-total-img]][npmv-url]
25+
[![PayPal Author Support][paypal-donate-img]][paypal-donate-url]
26+
[![Share Love Tweet][shareb]][shareu]
27+
[![NPM Downloads Weekly][downloads-weekly-img]][npmv-url]
28+
[![NPM Downloads Monthly][downloads-monthly-img]][npmv-url]
29+
[![NPM Downloads Total][downloads-total-img]][npmv-url]
30+
31+
Project is [semantically](https://semver.org) & automatically released on [CircleCI][codecoverage-url] with [new-release][] and its [New Release](https://github.com/apps/new-release) GitHub App.
2832

29-
Project is [semantically](https://semver.org) & automatically released on [CircleCI][codecoverage-url] with [new-release][] and its [New Release](https://github.com/apps/new-release) Github App.
3033

3134
## Table of Contents
3235
<!-- toc -->
3336

3437
## Install
35-
36-
This project requires [**Node.js**][nodeversion-url] **{%= engines.node %}**. Install it using [**yarn**](https://yarnpkg.com).
38+
This project requires [**Node.js**][nodeversion-url] **{%= engines.node %}**. Install it using [**yarn**](https://yarnpkg.com) or [**npm**](https://npmjs.com).
39+
_We highly recommend to use Yarn when you think to contribute to this project._
3740

3841
```bash
3942
$ yarn add {%= name %} --dev
4043

4144
# or globally
4245
$ yarn global add {%= name %}
4346

44-
# and just run it
47+
# then just run
4548
$ {%= name %}
4649
```
4750

4851
## API
49-
{%= apidocs('src/index.mjs') %}
52+
{%= apidocs('src/index.js') %}
5053

5154
**[back to top](#thetop)**
5255

5356
{% if (verb.related && verb.related.list && verb.related.list.length) { %}
57+
5458
## Related Projects
55-
Some of these projects are used here or were inspiration for this one, others are just related. So, thanks for your existance!
56-
{%= related(verb.related.list, { words: 12 }) %}
59+
Some of these projects are used here or were inspiration for this one, others are just related. So, thanks for your existance!
60+
{%= related(verb.related.list, { words: 11 }) %}
5761

5862
**[back to top](#thetop)**
5963
{% } %}
6064

61-
6265
## Contributing
6366
Please read the [Contributing Guide](./CONTRIBUTING.md) and [Code of Conduct](./CODE_OF_CONDUCT.md) documents for advices.
6467
For bugs reports and feature requests, [please create an issue][open-issue-url] or ping [@tunnckoCore](https://twitter.com/tunnckoCore) at Twitter.
6568

69+
## Contributors
70+
Thanks to the hard work of [these wonderful people](./CONTRIBUTORS.md) this project is alive and it also follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.
71+
[Pull requests](https://github.com/tunnckoCore/contributing#opening-a-pull-request), stars and all kind of [contributions](https://opensource.guide/how-to-contribute/#what-it-means-to-contribute) are always welcome. :star2:
72+
73+
## Users
74+
You can see who uses `{%= name %}` in the [USERS.md](./USERS.md) file. Please feel free adding this file if it not exists.
75+
If you or your organization are using this project, consider adding yourself to the list of users.
76+
**Thank You!** :heart:
77+
6678
## License
6779
Copyright (c) {%= licenseStart %}-present, [Charlike Mike Reagent][author-link] `<olsten.larck@gmail.com>`.
6880
Released under the [{%= license %} License][license-url].
6981

70-
***
82+
---
7183

72-
{%= include('footer') %}
84+
{%= include('footer') %}
7385

7486
<!-- Heading badges -->
7587
[npmv-url]: https://www.npmjs.com/package/{%= name %}
76-
[npmv-img]: https://img.shields.io/npm/v/{%= name %}.svg?label=npm%20version
88+
[npmv-img]: https://badgen.net/npm/v/{%= name %}?label=npm%20version
7789

7890
[ghrelease-url]: https://github.com/{%= repository %}/releases/latest
79-
[ghrelease-img]: https://img.shields.io/github/release/{%= repository %}.svg?label=github%20release
91+
[ghrelease-img]: https://badgen.net/github/release/{%= repository %}?label=github%20release
8092

8193
[license-url]: https://github.com/{%= repository %}/blob/master/LICENSE
82-
[license-img]: https://img.shields.io/badge/license-{%= license.replace('-', '%20') %}-blue.svg
94+
[license-img]: https://badgen.net/npm/license/{%= name %}
8395

8496
<!-- Front line badges -->
8597

8698
[codestyle-url]: https://github.com/olstenlarck/xaxa
87-
[codestyle-img]: https://img.shields.io/badge/code_style-xaxa-brightgreen.svg
99+
[codestyle-img]: https://badgen.net/badge/code%20style/xaxa/green
88100

89101
[linuxbuild-url]: https://circleci.com/gh/{%= repository %}/tree/master
90-
[linuxbuild-img]: https://img.shields.io/circleci/project/github/{%= repository %}/master.svg
102+
[linuxbuild-img]: https://badgen.net/circleci/github/{%= repository %}/master
91103

92104
[codecoverage-url]: https://codecov.io/gh/{%= repository %}
93-
[codecoverage-img]: https://img.shields.io/codecov/c/github/{%= repository %}/master.svg
105+
[codecoverage-img]: https://codecov.io/gh/{%= repository %}/branch/master/graph/badge.svg
94106

95107
[dependencies-url]: https://david-dm.org/{%= repository %}
96-
[dependencies-img]: https://img.shields.io/david/{%= repository %}.svg
108+
[dependencies-img]: https://badgen.net/david/dep/{%= repository %}
97109

98110
[ccommits-url]: https://conventionalcommits.org/
99-
[ccommits-img]: https://img.shields.io/badge/conventional_commits-1.0.0-yellow.svg
111+
[ccommits-img]: https://badgen.net/badge/conventional%20commits/v1.0.0/dfb317
100112

101113
[new-release-url]: https://github.com/tunnckoCore/new-release
102-
[new-release-img]: https://img.shields.io/badge/semantically-released-05C5FF.svg
103-
104-
[downloads-weekly-img]: https://img.shields.io/npm/dw/{%= name %}.svg
105-
[downloads-monthly-img]: https://img.shields.io/npm/dm/{%= name %}.svg
106-
[downloads-total-img]: https://img.shields.io/npm/dt/{%= name %}.svg
114+
[new-release-img]: https://badgen.net/badge/semantically/released/05c5ff
107115

108-
[nodeversion-url]: https://nodejs.org/en/download
109-
[nodeversion-img]: https://img.shields.io/node/v/{%= name %}.svg
116+
[downloads-weekly-img]: https://badgen.net/npm/dw/{%= name %}
117+
[downloads-monthly-img]: https://badgen.net/npm/dm/{%= name %}
118+
[downloads-total-img]: https://badgen.net/npm/dt/{%= name %}
110119

111120
[renovateapp-url]: https://renovatebot.com
112-
[renovateapp-img]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg
121+
[renovateapp-img]: https://badgen.net/badge/renovate/enabled/green
113122

114-
[prs-welcome-img]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
123+
[prs-welcome-img]: https://badgen.net/badge/PRs/welcome/green
115124
[prs-welcome-url]: http://makeapullrequest.com
116125

117126
[paypal-donate-url]: https://paypal.me/tunnckoCore/10
118-
[paypal-donate-img]: https://img.shields.io/badge/$-support-f47721.svg
127+
[paypal-donate-img]: https://badgen.net/badge/$/support/purple
119128

120-
[share-love-url]: https://twitter.com/intent/tweet?text=https://github.com/{%= repository %}&via=tunnckoCore
121-
[share-love-img]: https://img.shields.io/badge/twitter-share-1da1f2.svg
129+
[shareu]: https://twitter.com/intent/tweet?text=https://github.com/{%= repository %}&via=tunnckoCore
130+
[shareb]: https://badgen.net/badge/twitter/share/1da1f2
122131
[open-issue-url]: https://github.com/{%= repository %}/issues/new
123-
[author-link]: https://i.am.charlike.online
132+
[author-link]: https://i.am.charlike.online

CODE_OF_CONDUCT.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
3030
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
31+
- Other conduct which could reasonably be considered inappropriate in a
3232
professional setting
3333

3434
## Our Responsibilities
@@ -71,4 +71,4 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
7171
available at [http://contributor-covenant.org/version/1/4][version]
7272

7373
[homepage]: http://contributor-covenant.org
74-
[version]: http://contributor-covenant.org/version/1/4/
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Contributing Guide :100:
1+
# Contributing Guide :100:
22

3-
> _Hello stranger! :sparkles: Please, read the [Code Of Conduct](./CODE_OF_CONDUCT.md) and the full guide at
4-
[tunnckoCore/contributing](https://github.com/tunnckoCore/contributing)!
3+
> _Hello stranger! :sparkles: Please, read the [Code Of Conduct](./CODE_OF_CONDUCT.md) and the full guide at
4+
> [tunnckoCore/contributing](https://github.com/tunnckoCore/contributing)!
55
> Even if you are an experienced developer or active open source maintainer, it worth look over there._
66
77
![welcome-teal](https://cloud.githubusercontent.com/assets/194400/22215755/76cb4dbc-e194-11e6-95ed-7def95e68f14.png)
88

99
> _Every thought, **every word**, and **every action**
10-
that **adds to** the **positive** is a **contribution to peace**. <br />
11-
Each and **every one** of us is **capable** of making such a **contribution**_.”
12-
~ [Aung San Suu Kyi](https://en.wikipedia.org/wiki/Aung_San_Suu_Kyi)
10+
> that **adds to** the **positive** is a **contribution to peace**. <br />
11+
> Each and **every one** of us is **capable** of making such a **contribution**_.”
12+
> ~ [Aung San Suu Kyi](https://en.wikipedia.org/wiki/Aung_San_Suu_Kyi)
1313
1414
<!-- Part 1 -->
1515

@@ -18,11 +18,11 @@ Each and **every one** of us is **capable** of making such a **contribution**_.
1818
If you’re a **new** open source contributor, the process can be intimidating.
1919
_What if you don’t know how to code?_ What if something goes wrong? **Don't worry!**
2020

21-
**You don’t have to contribute code!** A common misconception about contributing to open source is that you
22-
need to _contribute code_. In fact, it’s often the other parts of a project that are most neglected or
23-
overlooked. You’ll do the project a _huge favor_ by offering to pitch in with these types of
21+
**You don’t have to contribute code!** A common misconception about contributing to open source is that you
22+
need to _contribute code_. In fact, it’s often the other parts of a project that are most neglected or
23+
overlooked. You’ll do the project a _huge favor_ by offering to pitch in with these types of
2424
**contributions**!
2525

26-
**Even if you like to write code**, other types of contributions are a great way to get involved with a
27-
project and meet other community members. Building those relationships will give you opportunities to work on
28-
other parts of the project.
26+
**Even if you like to write code**, other types of contributions are a great way to get involved with a
27+
project and meet other community members. Building those relationships will give you opportunities to work on
28+
other parts of the project.

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@
178178
APPENDIX: How to apply the Apache License to your work.
179179

180180
To apply the Apache License to your work, attach the following
181-
boilerplate notice, with the fields enclosed by brackets "[]"
181+
boilerplate notice, with the fields enclosed by brackets "{}"
182182
replaced with your own identifying information. (Don't include
183183
the brackets!) The text should be enclosed in the appropriate
184184
comment syntax for the file format. We also recommend that a
185185
file or class name and description of purpose be included on the
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2018-preset Charlike Mike Reagent <olsten.larck@gmail.com>
189+
Copyright (c) 2018-present, Charlike Mike Reagent (https://i.am.charlike.online)
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)