Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed Mar 29, 2021
0 parents commit fb976e8
Show file tree
Hide file tree
Showing 32 changed files with 11,950 additions and 0 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"presets":["@form8ion"],"ignore":["./lib/"],"env":{"test":{"plugins":["istanbul"]}}}
1 change: 1 addition & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@form8ion']};
1 change: 1 addition & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path":"./node_modules/cz-conventional-changelog"}
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/lib/
/coverage/
11 changes: 11 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root: true
extends:
- '@form8ion'
- '@form8ion/mocha'
- '@form8ion/cucumber'

overrides:
- files: example.js
rules:
import/no-extraneous-dependencies: off
no-console: off
1 change: 1 addition & 0 deletions .gherkin-lintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"no-restricted-tags":["on",{"tags":["@focus"]}],"use-and":"on","no-multiple-empty-lines":"on","no-dupe-feature-names":"on"}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
6 changes: 6 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_extends: .github
repository:
name: husky
description: opinionated scaffolder for configuring Git hooks using husky
homepage: https://npm.im/@form8ion/husky
private: false
49 changes: 49 additions & 0 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Node.js CI
'on':
push:
branches:
- master
- alpha
- beta
- 'renovate/*'
pull_request:
types:
- opened
- synchronize
env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- uses: bahmutov/npm-install@v1
- run: npm test
- name: Upload coverage data to Codecov
run: npm run coverage:report
release:
needs: verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- uses: bahmutov/npm-install@v1
- name: semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/node_modules/
/lib/
/coverage/
/.nyc_output/

.eslintcache
1 change: 1 addition & 0 deletions .huskyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hooks":{"pre-commit":"npm test","commit-msg":"commitlint --edit"}}
1 change: 1 addition & 0 deletions .lockfile-lintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path":"package-lock.json","type":"npm","validate-https":true,"allowed-hosts":["npm"]}
1 change: 1 addition & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"ui":"tdd","require":["@babel/register","./test/mocha-setup.js"]}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
update-notifier=false
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14
1 change: 1 addition & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"extends":"@istanbuljs/nyc-config-babel","reporter":["lcov","text-summary","html"],"exclude":["src/**/*-test.js","test/","thirdparty-wrappers/","vendor/"]}
14 changes: 14 additions & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// https://github.com/remarkjs/remark/tree/master/packages/remark-stringify#options
exports.settings = {
listItemIndent: 1,
emphasis: '_',
strong: '_',
bullet: '*',
incrementListMarker: false
};

exports.plugins = [
'@form8ion/remark-lint-preset',
['remark-toc', {tight: true}],
['remark-usage', {heading: 'example'}]
];
1 change: 1 addition & 0 deletions .renovaterc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"extends":["github>form8ion/renovate-config:js-package"]}
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MIT License

Copyright (c) 2021 Matt Travi

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
112 changes: 112 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# husky

opinionated scaffolder for configuring [Git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
using [husky](https://typicode.github.io/husky)

<!--status-badges start -->

[![Node CI Workflow Status][github-actions-ci-badge]][github-actions-ci-link]

<!--status-badges end -->

## Table of Contents

* [Usage](#usage)
* [Installation](#installation)
* [Example](#example)
* [Contributing](#contributing)
* [Dependencies](#dependencies)
* [Verification](#verification)

## Usage

<!--consumer-badges start -->

[![MIT license][license-badge]][license-link]
[![npm][npm-badge]][npm-link]
[![Try @form8ion/husky on RunKit][runkit-badge]][runkit-link]

<!--consumer-badges end -->

### Installation

```sh
$ npm install @form8ion/husky --save
```

### Example

#### Import

```javascript
import {scaffold} from '@form8ion/husky';
```

#### Execute

```javascript
(async () => {
await scaffold({projectRoot: process.cwd()});
})();
```

## Contributing

<!--contribution-badges start -->

[![PRs Welcome][PRs-badge]][PRs-link]
[![Commitizen friendly][commitizen-badge]][commitizen-link]
[![Conventional Commits][commit-convention-badge]][commit-convention-link]
[![semantic-release][semantic-release-badge]][semantic-release-link]
[![Renovate][renovate-badge]][renovate-link]

<!--contribution-badges end -->

### Dependencies

```sh
$ nvm install
$ npm install
```

### Verification

```sh
$ npm test
```

[PRs-link]: http://makeapullrequest.com

[PRs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg

[commitizen-link]: http://commitizen.github.io/cz-cli/

[commitizen-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg

[commit-convention-link]: https://conventionalcommits.org

[commit-convention-badge]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg

[semantic-release-link]: https://github.com/semantic-release/semantic-release

[semantic-release-badge]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg

[renovate-link]: https://renovatebot.com

[renovate-badge]: https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iA3IDAgOWw0NyA0N2E2IDYgMCAwMDkgMGw3LThjMy0yIDMtNiAwLTlsLTQ2LTQ2Yy0yLTItMy0yLTUtMnoiLz48L3N2Zz4=

[github-actions-ci-link]: https://github.com/form8ion/husky/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster

[github-actions-ci-badge]: https://github.com/form8ion/husky/workflows/Node.js%20CI/badge.svg

[license-link]: LICENSE

[license-badge]: https://img.shields.io/github/license/form8ion/husky.svg

[npm-link]: https://www.npmjs.com/package/@form8ion/husky

[npm-badge]: https://img.shields.io/npm/v/@form8ion/husky.svg

[runkit-link]: https://npm.runkit.com/@form8ion/husky

[runkit-badge]: https://badge.runkitcdn.com/@form8ion/husky.svg
6 changes: 6 additions & 0 deletions cucumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
base: '--require-module @babel/register --format-options \'{"snippetInterface": "async-await"}\'',
wip: '--tags "@wip"',
noWip: '--tags "not @wip"',
focus: '--tags @focus'
};
13 changes: 13 additions & 0 deletions example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// #### Import
// remark-usage-ignore-next
import stubbedFs from 'mock-fs';
import {scaffold} from './lib/index.cjs';

// remark-usage-ignore-next
stubbedFs();

// #### Execute

(async () => {
await scaffold({projectRoot: process.cwd()});
})();
Loading

0 comments on commit fb976e8

Please sign in to comment.