Skip to content

Commit

Permalink
major(refactor): expose API, update repo template, simplify CLI
Browse files Browse the repository at this point in the history
add support in CLI for linting from stdin

Signed-off-by: Charlike Mike Reagent <olsten.larck@gmail.com>
  • Loading branch information
Charlike Mike Reagent committed Jul 24, 2018
1 parent 55700fb commit c5d94d6
Show file tree
Hide file tree
Showing 14 changed files with 1,738 additions and 838 deletions.
86 changes: 55 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,67 @@
version: 2

defaults: &defaults
node8: &node8
working_directory: ~/xaxa
docker:
- image: circleci/node:8

node10: &node10
working_directory: ~/xaxa
docker:
- image: circleci/node:10

restore_modules_cache: &restore_modules_cache
restore_cache:
keys:
- xaxa-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- xaxa-

jobinstall: &jobinstall
steps:
- checkout
- *restore_modules_cache
- run:
name: Installing Dependencies
command: yarn install
- save_cache:
key: xaxa-{{ checksum "yarn.lock" }}
paths: node_modules
- run:
name: Remove node_modules to cleanup workspace
command: rm -rf node_modules

jobtest: &jobtest
steps:
- checkout
- *restore_modules_cache
- run:
name: Running tests and checks
command: yarn test
- run:
name: Sending test coverage to CodeCov
command: bash <(curl -s https://codecov.io/bash)


jobs:
install:
<<: *defaults
steps:
- checkout
- *restore_modules_cache
- run:
name: Installing dependencies
command: yarn install
- save_cache:
key: xaxa-{{ checksum "yarn.lock" }}
paths: node_modules
- run:
name: Remove node_modules to cleanup workspace
command: rm -rf node_modules
install-on-node8:
<<: *node8
<<: *jobinstall

test:
<<: *defaults
steps:
- checkout
- *restore_modules_cache
- run:
name: Running tests and checks
command: yarn test
- run:
name: Sending test coverage to CodeCov
command: bash <(curl -s https://codecov.io/bash)
test-on-node8:
<<: *node8
<<: *jobtest

install-on-node10:
<<: *node10
<<: *jobinstall

test-on-node10:
<<: *node10
<<: *jobtest

release:
<<: *defaults
<<: *node10
steps:
- checkout
- *restore_modules_cache
Expand All @@ -54,13 +73,18 @@ workflows:
version: 2
automated:
jobs:
- install
- test:
- install-on-node8
- test-on-node8:
requires:
- install-on-node8
- install-on-node10
- test-on-node10:
requires:
- install
- install-on-node10
- release:
requires:
- test
- test-on-node8
- test-on-node10
filters:
branches:
only: master
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ node_modules
coverage
.nyc_output
.eslintcache
dist
xaxa

# npm >=5 lock file (& shrinkwrap), we use Yarn!
package-lock.json
Expand Down
93 changes: 51 additions & 42 deletions .verb.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# xaxa [![npm version][npmv-img]][npmv-url] [![github release][ghrelease-img]][ghrelease-url] [![License][license-img]][license-url]
# {%= 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]

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

> :star2: Zero-config linting, powered by few amazing unicorns :unicorn:, [AirBnB](https://github.com/airbnb/javascript) :revolving_hearts: & [Prettier](https://prettier.io/) :tada:
<div id="thetop"></div>

[![XAXA code style][codestyle-img]][codestyle-url]
[![CircleCI linux build][linuxbuild-img]][linuxbuild-url]
[![CodeCov coverage status][codecoverage-img]][codecoverage-url]
[![DavidDM dependency status][dependencies-img]][dependencies-url]
[![Renovate App Status][renovateapp-img]][renovateapp-url]
[![Make A Pull Request][prs-welcome-img]][prs-welcome-url]
[![CircleCI linux build][linuxbuild-img]][linuxbuild-url]
[![CodeCov coverage status][codecoverage-img]][codecoverage-url]
[![DavidDM dependency status][dependencies-img]][dependencies-url]
[![Renovate App Status][renovateapp-img]][renovateapp-url]
[![Make A Pull Request][prs-welcome-img]][prs-welcome-url]

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.
For bugs reports and feature requests, [please create an issue][open-issue-url] or ping [@tunnckoCore](https://twitter.com/tunnckoCore) at Twitter.

[![Conventional Commits][ccommits-img]][ccommits-url]
[![PayPal Author Support][paypal-donate-img]][paypal-donate-url]
[![Share Love Tweet][share-love-img]][share-love-url]
[![NPM Downloads Weekly][downloads-weekly-img]][npmv-url]
[![NPM Downloads Monthly][downloads-monthly-img]][npmv-url]
[![NPM Downloads Total][downloads-total-img]][npmv-url]
[![PayPal Author Support][paypal-donate-img]][paypal-donate-url]
[![Share Love Tweet][shareb]][shareu]
[![NPM Downloads Weekly][downloads-weekly-img]][npmv-url]
[![NPM Downloads Monthly][downloads-monthly-img]][npmv-url]
[![NPM Downloads Total][downloads-total-img]][npmv-url]

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.

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.

## Table of Contents
<!-- toc -->

## Install

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

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

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

# and just run it
# then just run
$ {%= name %}
```

## API
{%= apidocs('src/index.mjs') %}
{%= apidocs('src/index.js') %}

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

{% if (verb.related && verb.related.list && verb.related.list.length) { %}

## Related Projects
Some of these projects are used here or were inspiration for this one, others are just related. So, thanks for your existance!
{%= related(verb.related.list, { words: 12 }) %}
Some of these projects are used here or were inspiration for this one, others are just related. So, thanks for your existance!
{%= related(verb.related.list, { words: 11 }) %}

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


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

## Contributors
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.
[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:

## Users
You can see who uses `{%= name %}` in the [USERS.md](./USERS.md) file. Please feel free adding this file if it not exists.
If you or your organization are using this project, consider adding yourself to the list of users.
**Thank You!** :heart:

## License
Copyright (c) {%= licenseStart %}-present, [Charlike Mike Reagent][author-link] `<olsten.larck@gmail.com>`.
Released under the [{%= license %} License][license-url].

***
---

{%= include('footer') %}
{%= include('footer') %}

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

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

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

<!-- Front line badges -->

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

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

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

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

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

[new-release-url]: https://github.com/tunnckoCore/new-release
[new-release-img]: https://img.shields.io/badge/semantically-released-05C5FF.svg

[downloads-weekly-img]: https://img.shields.io/npm/dw/{%= name %}.svg
[downloads-monthly-img]: https://img.shields.io/npm/dm/{%= name %}.svg
[downloads-total-img]: https://img.shields.io/npm/dt/{%= name %}.svg
[new-release-img]: https://badgen.net/badge/semantically/released/05c5ff

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

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

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

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

[share-love-url]: https://twitter.com/intent/tweet?text=https://github.com/{%= repository %}&via=tunnckoCore
[share-love-img]: https://img.shields.io/badge/twitter-share-1da1f2.svg
[shareu]: https://twitter.com/intent/tweet?text=https://github.com/{%= repository %}&via=tunnckoCore
[shareb]: https://badgen.net/badge/twitter/share/1da1f2
[open-issue-url]: https://github.com/{%= repository %}/issues/new
[author-link]: https://i.am.charlike.online
[author-link]: https://i.am.charlike.online
24 changes: 12 additions & 12 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

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

Examples of unacceptable behavior by participants include:

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

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

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[version]: http://contributor-covenant.org/version/1/4/
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Contributing Guide :100:
# Contributing Guide :100:

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

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

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

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

**Even if you like to write code**, other types of contributions are a great way to get involved with a
project and meet other community members. Building those relationships will give you opportunities to work on
other parts of the project.
**Even if you like to write code**, other types of contributions are a great way to get involved with a
project and meet other community members. Building those relationships will give you opportunities to work on
other parts of the project.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@
APPENDIX: How to apply the Apache License to your work.

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

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

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

0 comments on commit c5d94d6

Please sign in to comment.