Skip to content

Commit

Permalink
feat: 🎸 initial commit
Browse files Browse the repository at this point in the history
First commit
  • Loading branch information
theowenyoung committed Sep 29, 2020
0 parents commit 73cfbf3
Show file tree
Hide file tree
Showing 61 changed files with 25,049 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

[*.{js,jsx,json,ts,tsx,yml}]
indent_size = 2
indent_style = space
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
**/__tests__/fixtures/
.yarn
package-lock.json
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"prettier",
"prettier/@typescript-eslint",
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
},
plugins: ["@typescript-eslint", "jest"],
rules: {},
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
49 changes: 49 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release
on:
workflow_dispatch:
repository_dispatch:
types: [new_version_with_actionsflow]
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout Branch
run: git checkout main
- name: Configure CI Git User
run: |
git config user.name github-actions[bot]
git config user.email ithub-actions[bot]@users.noreply.github.com
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node
- name: Update & Build
run: |
npm ci
npm update
npm run build
npm run test
- name: Git status
run: git status
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add dist/main/index.js package.json package-lock.json
git commit -m "chore\(release\): 🤖 update actionsflow dependence & build bundle"
npm run release
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: Released Packages
author_name:
fields: repo,message,author,ref,job,took # selectable (default: repo,message)
env:
GITHUB_TOKEN: ${{ github.token }} # optional
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK }} # required
if: always() # Pick up events even if the job fails or is canceled.
21 changes: 21 additions & 0 deletions .github/workflows/release-alias.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update Release Alias

on:
release:
types: [published]

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update major tag
if: github.event.release.prerelease == false
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
export TAG_NAME="${GITHUB_REF##refs/tags/}"
export TAG_MAJOR="${TAG_NAME%%.*}"
git tag --force -a "${TAG_MAJOR}" -m "chore\(release\): 🤖 release ${TAG_NAME}"
git push --force origin "${TAG_MAJOR}"
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test
on:
push:
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2016]
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}
- name: build and test
run: |
npm ci
npm run build
npm run test
env:
CI: true
157 changes: 157 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# General
.DS_Store
.AppleDouble
.LSOverride
packages2
packages3
# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

!dist/
dist/*
!dist/main/
dist/main/*
!dist/main/index.js
!dist/pre/
dist/pre/*
!dist/pre/index.js
!dist/post/
dist/post/*
!dist/post/index.js
/workflows/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/
3 changes: 3 additions & 0 deletions .npmignore copy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__fixtures__
__snapshots__
*.test.js
19 changes: 19 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
**/dist/**
**/__tests__/fixtures/
*.min.js
**/node_modules/**
# cache-dirs
**/.cache
# ignore built packages
packages/**/*.js
!packages/*/src/**/*.js


# fixtures
**/__tests__/fixtures/**

# coverage
coverage

.yarn
package-lock.json
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
19 changes: 19 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"git": {
"commitMessage": "chore(release): 🤖 v${version}",
"requireBranch": "main",
"requireCommits": true,
"tagName": "v${version}",
"push": true
},
"github": {
"release": true
},
"npm": { "publish": false },
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "CHANGELOG.md"
}
}
}
1 change: 1 addition & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
Loading

0 comments on commit 73cfbf3

Please sign in to comment.