Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(root): sets up dev configuration, ci/cd pipelines, and tools
- Loading branch information
1 parent
52c134c
commit ddb843a
Showing
14 changed files
with
6,866 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: '/' | ||
open-pull-requests-limit: 10 | ||
schedule: | ||
day: 'sunday' | ||
interval: 'weekly' | ||
time: '22:00' | ||
timezone: 'America/Bogota' | ||
target-branch: 'staging' | ||
|
||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
open-pull-requests-limit: 10 | ||
schedule: | ||
day: 'sunday' | ||
interval: 'weekly' | ||
time: '22:00' | ||
timezone: 'America/Bogota' | ||
target-branch: 'staging' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Feature | ||
|
||
on: | ||
pull_request: | ||
branches: [staging] | ||
|
||
jobs: | ||
review_code: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ['14.x'] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.9.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Get Yarn Cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache Dependencies | ||
uses: actions/cache@v2.1.5 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install Dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
|
||
- name: Linting | ||
run: yarn run eslint | ||
|
||
- name: Type checking | ||
run: yarn run tsc | ||
|
||
- name: Tests | ||
run: yarn run test:ci | ||
|
||
- name: Build | ||
run: yarn run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [production] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ['14.x'] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.9.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Get Yarn Cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache Dependencies | ||
uses: actions/cache@v2.1.5 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install Dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Publish to NPM | ||
uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
access: public | ||
token: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Staging | ||
|
||
on: | ||
pull_request: | ||
branches: [production] | ||
|
||
jobs: | ||
review_code: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ['14.x'] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.9.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Get Yarn Cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache Dependencies | ||
uses: actions/cache@v2.1.5 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install Dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
|
||
- name: Linting | ||
run: yarn run eslint | ||
|
||
- name: Type checking | ||
run: yarn run tsc | ||
|
||
- name: Tests | ||
run: yarn run test:ci | ||
|
||
- name: Build | ||
run: yarn run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,7 @@ dist | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Misc | ||
.DS_Store | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint -e $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
14.15.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
bail: true, | ||
collectCoverage: true, | ||
collectCoverageFrom: ['src/index.ts'], | ||
preset: 'ts-jest', | ||
roots: ['<rootDir>'], | ||
testEnvironment: 'node', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"name": "rehype-code-titles", | ||
"version": "1.0.0", | ||
"description": "Rehype plugin for parsing code blocks and adding titles to code blocks", | ||
"author": { | ||
"email": "me@codybrunner.dev", | ||
"name": "Cody Brunner", | ||
"url": "https://codybrunner.dev" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/rockchalkwushock/rehype-code-titles.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/rockchalkwushock/rehype-code-titles/issues" | ||
}, | ||
"homepage": "https://github.com/rockchalkwushock/rehype-code-titles#readme", | ||
"license": "MIT", | ||
"files": [ | ||
"dist" | ||
], | ||
"keywords": [ | ||
"code-titles", | ||
"html", | ||
"mdx", | ||
"rehype", | ||
"rehype-plugin", | ||
"remark", | ||
"unified" | ||
], | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"commit": "git cz", | ||
"format": "prettier --write", | ||
"lint": "eslint", | ||
"prepare": "husky install", | ||
"release": "standard-version", | ||
"test": "jest --maxWorkers=50%", | ||
"test:ci": "jest --ci --passWithNoTests --runInBand", | ||
"test:coverage": "yarn test --coverage", | ||
"test:watch": "jest --maxWorkers=25% --onlyChanged --watch", | ||
"type-check": "tsc --noEmit" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^12.1.1", | ||
"@commitlint/config-conventional": "^12.1.1", | ||
"@rockchalkwushock/eslint-config": "^1.0.3", | ||
"@types/dedent": "^0.7.0", | ||
"@types/jest": "^26.0.22", | ||
"@types/node": "^14.14.41", | ||
"commitizen": "^4.2.3", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"dedent": "^0.7.0", | ||
"eslint": "^7.24.0", | ||
"husky": "^6.0.0", | ||
"jest": "^26.6.3", | ||
"lint-staged": "^10.5.4", | ||
"prettier": "^2.2.1", | ||
"standard-version": "^9.2.0", | ||
"ts-jest": "^26.5.5", | ||
"typescript": "^4.2.4" | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "cz-conventional-changelog" | ||
} | ||
}, | ||
"eslintConfig": { | ||
"extends": "@rockchalkwushock/eslint-config", | ||
"ignorePatterns": [ | ||
"package.json", | ||
"tsconfig.json" | ||
] | ||
}, | ||
"lint-staged": { | ||
"*.+(js|json|md|mdx|ts|tsx|yml|yaml)": [ | ||
"prettier --write" | ||
], | ||
"*.+(ts|tsx)": [ | ||
"eslint --fix", | ||
"tsc --esModuleInterop --noEmit", | ||
"jest --lastCommit --maxWorkers=25% --passWithNoTests" | ||
] | ||
}, | ||
"prettier": { | ||
"arrowParens": "avoid", | ||
"semi": false, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5" | ||
}, | ||
"standard-version": { | ||
"types": [ | ||
{ | ||
"section": "Bugs 🐛", | ||
"type": "fix" | ||
}, | ||
{ | ||
"section": "Features 🎉", | ||
"type": "feat" | ||
}, | ||
{ | ||
"section": "Tests 🧪", | ||
"type": "test" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const x = 42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"isolatedModules": true, | ||
"module": "CommonJS", | ||
"moduleResolution": "Node", | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"outDir": "dist", | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"target": "esnext" | ||
}, | ||
"exclude": ["node_modules", "src/**/*.test.ts", "src/__snapshots__/*.snap"], | ||
"include": ["src"] | ||
} |
Oops, something went wrong.