Skip to content

Commit

Permalink
feat: org migration, core plugin alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
webketje committed Feb 15, 2022
1 parent 0591f0b commit ce3c8f1
Show file tree
Hide file tree
Showing 31 changed files with 7,195 additions and 602 deletions.
13 changes: 4 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# http://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2

[*.{js,json,yml}]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

19 changes: 19 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
env:
node: true
es6: true
extends:
- 'eslint:recommended'
- 'plugin:node/recommended'
- 'plugin:import/recommended'
- 'prettier'
parserOptions:
ecmaVersion: 2020
rules:
no-console: error
prefer-const: error
no-var: error
node/exports-style: [0, error]
import/first: error
import/no-anonymous-default-export: error
import/no-unassigned-import: error
import/no-internal-modules: error
18 changes: 4 additions & 14 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
# Automatically normalize line endings for all text-based files
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
* text=auto
* text=auto eol=lf

# For the following file types, normalize line endings to LF on
# checkin and prevent conversion to CRLF when they are checked out
# (this is required in order to prevent newline related issues like,
# for example, after the build script is run)
.* text eol=lf
*.css text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.sh text eol=lf
*.txt text eol=lf
*.xml text eol=lf
# For binary file types, prevent converting CRLF chars
*.jpg -text
*.png -text
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Before opening an issue

* The issues aren't meant for support requests but for reporting bugs and feature requests. If you
have a support request then please use: http://metalsmith-slack.herokuapp.com/ or http://stackoverflow.com/questions/tagged/metalsmith
- The issues aren't meant for support requests but for reporting bugs and feature requests. If you
have a support request then please use: http://metalsmith-slack.herokuapp.com/ or http://stackoverflow.com/questions/tagged/metalsmith

* If you're reporting a bug, please open either a pull request with a failing test demonstrating the
problem, or include a link to a repository with a reduced test case demonstrating the problem.
- If you're reporting a bug, please open either a pull request with a failing test demonstrating the
problem, or include a link to a repository with a reduced test case demonstrating the problem.
10 changes: 10 additions & 0 deletions .github/workflows/gitter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Gitter release notification
on: create

jobs:
notify:
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: curl --data-urlencode "message=[${{github.repository}} ${{github.ref_name}}](https://github.com/${{github.repository}}/releases/${{github.ref_name}}) released" ${{secrets.GITTER_CUSTOM_WEBHOOK}}
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI
on:
push:
branches: ['**']
pull_request:
branches: ['master']

jobs:
pre-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: 'npm'

- run: npm install
- run: npm run format:check
- run: npm run lint:check

branch-test:
if: github.ref_name != 'master' && success()
needs: pre-test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
node: ['12.0']
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: 'npm'

- run: npm install
- run: npm test

test:
if: github.ref_name == 'master' && success()
needs: pre-test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
node: ['12.0', '14.0', '16.0']
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- run: npm install
- run: npm test
- if: matrix.os == 'ubuntu-latest' && matrix.node == '16.0'
run: npm run coverage
- if: matrix.os == 'ubuntu-latest' && matrix.node == '16.0'
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ github.token }}
path-to-lcov: ./coverage.info
17 changes: 7 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Node
node_modules
npm-debug.log
yarn-error.log
package-lock.json

# Test build results
npm-debug.log*
.npm
*.tgz
.eslintcache
.nyc_output
coverage.info
test/fixtures/*/build

# Coverage reports
/coverage
node_modules
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run format:check && npm run lint:check && npm test
7 changes: 0 additions & 7 deletions .lintstagedrc

This file was deleted.

11 changes: 0 additions & 11 deletions .npmignore

This file was deleted.

4 changes: 3 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
package-lock=false
package-lock.json = false
sign-git-tag = true
message = Bump package.json to %s
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test/fixtures/**
.nyc_output/**
package-lock.json
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
trailingComma: none
tabWidth: 2
semi: false
singleQuote: true
bracketSpacing: true
arrowParens: always
printWidth: 120
24 changes: 24 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"hooks": {
"before:init": ["npm run lint", "npm test"],
"after:bump": "auto-changelog -p --commit-limit false --ignore-commit-pattern '^((dev|chore|ci):|Release)'",
"after:npm:bump": "npm pack",
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
},
"git": {
"commitMessage": "Release ${version}",
"commitArgs": ["-S"],
"tagAnnotation": "Release ${version}",
"tagArgs": ["-s"],
"changelog": "auto-changelog -u --commit-limit false --ignore-commit-pattern '^((dev|chore|ci):|Release)' --stdout -t https://github.com/raw/release-it/release-it/master/templates/changelog-compact.hbs"
},
"npm": {
"publish": false
},
"github": {
"release": true,
"releaseName": "@metalsmith/~core-plugin~ ${version}",
"tokenRef": "GITHUB_TOKEN",
"assets": ["metalsmith-~core-plugin~-${version}.tgz"]
}
}
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit ce3c8f1

Please sign in to comment.