Skip to content

Commit 8281ba8

Browse files
authored
Initial commit
0 parents  commit 8281ba8

19 files changed

Lines changed: 19701 additions & 0 deletions

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[*]
2+
charset = utf-8
3+
4+
[*.{js,json,yml}]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Automatically normalize line endings for all text-based files
2+
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
3+
* text=auto eol=lf
4+
5+
# For binary file types, prevent converting CRLF chars
6+
*.jpg -text
7+
*.png -text

.github/workflows/test.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: ['**']
5+
pull_request:
6+
branches: ['main']
7+
8+
jobs:
9+
pre-test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
- uses: actions/setup-node@v6
14+
with:
15+
cache: 'npm'
16+
17+
- run: npm install
18+
- run: npm run format:check
19+
- run: npm run lint:check
20+
21+
branch-test:
22+
if: github.ref_name != 'main' && success()
23+
needs: pre-test
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
matrix:
27+
os: ['ubuntu-latest', 'windows-latest']
28+
node: ['16.0.0']
29+
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
30+
steps:
31+
- uses: actions/checkout@v5
32+
- uses: actions/setup-node@v6
33+
with:
34+
cache: 'npm'
35+
36+
- run: npm install
37+
- run: npm test
38+
39+
test:
40+
if: github.ref_name == 'main' && success()
41+
needs: pre-test
42+
runs-on: ${{ matrix.os }}
43+
strategy:
44+
matrix:
45+
os: ['ubuntu-latest', 'windows-latest']
46+
node: ['16.0.0', '18', '20', '22', '24']
47+
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
48+
steps:
49+
- uses: actions/checkout@v5
50+
- uses: actions/setup-node@v6
51+
with:
52+
node-version: ${{ matrix.node }}
53+
cache: 'npm'
54+
55+
- run: npm install
56+
- run: npm test
57+
- if: matrix.os == 'ubuntu-latest' && matrix.node == '24'
58+
run: npm run coverage
59+
- if: matrix.os == 'ubuntu-latest' && matrix.node == '24'
60+
uses: coverallsapp/github-action@v2
61+
with:
62+
file: coverage.info
63+
format: lcov

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
npm-debug.log*
2+
.npm
3+
*.tgz
4+
.eslintcache
5+
coverage
6+
coverage.info
7+
test/fixtures/*/build
8+
node_modules
9+
lib/*
10+
!lib/*.d.ts

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package-lock.json = false
2+
sign-git-tag = true
3+
message = Bump package.json to %s

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test/fixtures/**
2+
.nyc_output/**
3+
package-lock.json

.prettierrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
trailingComma: none
2+
tabWidth: 2
3+
semi: false
4+
singleQuote: true
5+
bracketSpacing: true
6+
arrowParens: always
7+
printWidth: 120

.release-it.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"hooks": {
3+
"before:init": ["npm run lint", "npm audit --omit=dev", "npm test"],
4+
"after:bump": "auto-changelog -p --commit-limit false --ignore-commit-pattern '^((dev|chore|ci):|Release)'",
5+
"after:npm:bump": "npm pack",
6+
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
7+
},
8+
"git": {
9+
"commitMessage": "Release ${version}",
10+
"commitArgs": ["-S"],
11+
"tagAnnotation": "Release ${version}",
12+
"tagArgs": ["-s"],
13+
"changelog": "auto-changelog -u --commit-limit false --ignore-commit-pattern '^((dev|chore|ci):|Release)' --stdout -t https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
14+
},
15+
"npm": {
16+
"publish": false
17+
},
18+
"github": {
19+
"release": true,
20+
"releaseName": "@metalsmith/~core-plugin~ ${version}",
21+
"tokenRef": "GITHUB_TOKEN",
22+
"assets": ["metalsmith-~core-plugin~-${version}.tgz"]
23+
}
24+
}

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 webketje
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, 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,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)