Skip to content

Commit 374cc1c

Browse files
committed
chore: initial commit
closes #5, closes #4, closes #1
0 parents  commit 374cc1c

29 files changed

+22745
-0
lines changed

.babelrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"presets":["@form8ion"],"ignore":["./lib/"],"env":{"test":{"plugins":["istanbul"]}}}

.c8rc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"reporter":["lcov","text-summary","html"],"exclude":["src/**/*-test.js","test/","thirdparty-wrappers/","vendor/"]}

.commitlintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@form8ion']};

.czrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"path":"./node_modules/cz-conventional-changelog"}

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
indent_style = space
10+
indent_size = 2
11+
end_of_line = lf
12+
insert_final_newline = true

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/coverage/
2+
/lib/

.eslintrc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
root: true
2+
extends:
3+
- '@form8ion'
4+
- '@form8ion/mocha'

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/settings.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_extends: .github
2+
repository:
3+
name: config-file
4+
description: form8ion utility for managing RC files
5+
homepage: https://npm.im/@form8ion/config-file
6+
private: false

.github/workflows/node-ci.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Node.js CI
2+
'on':
3+
push:
4+
branches:
5+
- master
6+
- beta
7+
- renovate/**
8+
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
env:
13+
FORCE_COLOR: 1
14+
NPM_CONFIG_COLOR: always
15+
jobs:
16+
verify:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Setup node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version-file: .nvmrc
24+
cache: npm
25+
- run: npm clean-install
26+
- run: npm test
27+
- uses: codecov/codecov-action@v3
28+
trigger-release:
29+
runs-on: ubuntu-latest
30+
if: github.event_name == 'push'
31+
needs:
32+
- verify
33+
steps:
34+
- uses: octokit/[email protected]
35+
with:
36+
route: >-
37+
POST
38+
/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
39+
owner: form8ion
40+
repo: config-file
41+
ref: ${{ github.ref }}
42+
workflow_id: release.yml
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

.github/workflows/release.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
'on':
3+
push:
4+
branches:
5+
- alpha
6+
workflow_dispatch: {}
7+
env:
8+
FORCE_COLOR: 1
9+
NPM_CONFIG_COLOR: always
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Setup node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version-file: .nvmrc
19+
cache: npm
20+
- run: npm clean-install
21+
- name: semantic-release
22+
run: npx semantic-release
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/node_modules/
2+
/lib/
3+
/coverage/
4+
5+
.eslintcache

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm test

.lockfile-lintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"path":"package-lock.json","type":"npm","validate-https":true,"allowed-hosts":["npm"]}

.mocharc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ui":"tdd","require":["@babel/register","./test/mocha-setup.js"]}

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
update-notifier=false

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16

.remarkrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"settings":{"listItemIndent":1,"emphasis":"_","strong":"_","bullet":"*","incrementListMarker":false},"plugins":["@form8ion/remark-lint-preset",["remark-toc",{"tight":true}],["remark-usage",{"heading":"example"}]]}

.renovaterc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"$schema":"https://docs.renovatebot.com/renovate-schema.json","extends":["github>form8ion/renovate-config:js-package"]}

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Matt Travi
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# config-file
2+
3+
form8ion utility for managing RC files
4+
5+
<!--status-badges start -->
6+
7+
[![Node CI Workflow Status][github-actions-ci-badge]][github-actions-ci-link]
8+
[![Codecov][coverage-badge]][coverage-link]
9+
10+
<!--status-badges end -->
11+
12+
## Table of Contents
13+
14+
* [Usage](#usage)
15+
* [Installation](#installation)
16+
* [Example](#example)
17+
* [Contributing](#contributing)
18+
* [Dependencies](#dependencies)
19+
* [Verification](#verification)
20+
21+
## Usage
22+
23+
<!--consumer-badges start -->
24+
25+
[![MIT license][license-badge]][license-link]
26+
[![npm][npm-badge]][npm-link]
27+
[![Try @form8ion/config-file on RunKit][runkit-badge]][runkit-link]
28+
29+
<!--consumer-badges end -->
30+
31+
### Installation
32+
33+
```sh
34+
$ npm install @form8ion/config-file --save-prod
35+
```
36+
37+
### Example
38+
39+
```javascript
40+
import configFile from '@form8ion/config-file';
41+
```
42+
43+
## Contributing
44+
45+
<!--contribution-badges start -->
46+
47+
[![PRs Welcome][PRs-badge]][PRs-link]
48+
[![Commitizen friendly][commitizen-badge]][commitizen-link]
49+
[![Conventional Commits][commit-convention-badge]][commit-convention-link]
50+
[![semantic-release: angular][semantic-release-badge]][semantic-release-link]
51+
[![Renovate][renovate-badge]][renovate-link]
52+
53+
<!--contribution-badges end -->
54+
55+
### Dependencies
56+
57+
```sh
58+
$ nvm install
59+
$ npm install
60+
```
61+
62+
### Verification
63+
64+
```sh
65+
$ npm test
66+
```
67+
68+
[PRs-link]: http://makeapullrequest.com
69+
70+
[PRs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
71+
72+
[commitizen-link]: http://commitizen.github.io/cz-cli/
73+
74+
[commitizen-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
75+
76+
[commit-convention-link]: https://conventionalcommits.org
77+
78+
[commit-convention-badge]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
79+
80+
[semantic-release-link]: https://github.com/semantic-release/semantic-release
81+
82+
[semantic-release-badge]: https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release
83+
84+
[renovate-link]: https://renovatebot.com
85+
86+
[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot
87+
88+
[github-actions-ci-link]: https://github.com/form8ion/config-file/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster
89+
90+
[github-actions-ci-badge]: https://github.com/form8ion/config-file/workflows/Node.js%20CI/badge.svg
91+
92+
[coverage-link]: https://codecov.io/github/form8ion/config-file
93+
94+
[coverage-badge]: https://img.shields.io/codecov/c/github/form8ion/config-file?logo=codecov
95+
96+
[license-link]: LICENSE
97+
98+
[license-badge]: https://img.shields.io/github/license/form8ion/config-file.svg
99+
100+
[npm-link]: https://www.npmjs.com/package/@form8ion/config-file
101+
102+
[npm-badge]: https://img.shields.io/npm/v/@form8ion/config-file?logo=npm
103+
104+
[runkit-link]: https://npm.runkit.com/@form8ion/config-file
105+
106+
[runkit-badge]: https://badge.runkitcdn.com/@form8ion/config-file.svg

example.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// remark-usage-ignore-next
2+
/* eslint-disable-next-line no-unused-vars */
3+
import configFile from './lib/index.cjs';

0 commit comments

Comments
 (0)