Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mg901 committed Nov 14, 2019
0 parents commit 9beb9a2
Show file tree
Hide file tree
Showing 22 changed files with 7,540 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "cz-conventional-changelog"
}
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist/
lib/
es/
flow-typed/
coverage/
src/index.d.ts
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
extends: ['airbnb-base', 'prettier'],
plugins: ['prettier', 'jest'],
env: {
node: true,
jest: true,
},
rules: {
'import/prefer-default-export': 0,
'no-restricted-syntax': 0,
'no-restricted-properties': 0,
'import/no-extraneous-dependencies': 0,
'no-underscore-dangle': 0,
'no-restricted-globals': 0,
'prefer-template': 0,
'func-names': 0,
'prefer-object-spread': 0,
'prefer-rest-params': 0,
'prefer-destructuring': 0,
'no-param-reassign': 0,
'guard-for-in': 0,
'no-plusplus': 0,
'no-var': 0,
'vars-on-top': 0,
},
};
45 changes: 45 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@your-github-username'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
node_modules/
dist/
es/
coverage/
.env

npm-debug.log*
yarn-debug.log*
yarn-error.log*


.idea
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json


.DS_Store
7 changes: 7 additions & 0 deletions .huskyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"hooks": {
"pre-commit": "lint-staged",
"pre-push": "npm test",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
17 changes: 17 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.vscode
src/test
.czrc
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.huskyrc.json
.nvmrc
.prettierrc.js
.size-limit.js
.travis.yml
commitlint.config.js
jest.config.js
lint-staged.config.js
release.config.js
*.lock
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v10.16.0
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
trailingComma: 'all',
singleQuote: true,
arrowParens: 'always',
};
6 changes: 6 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = [
{
path: 'src/index.js',
limit: '1.77kb',
},
];
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: node_js
cache: yarn
node_js:
- node
- "10"
os:
- linux
- osx
branches:
only:
- master
- "/^greenkeeper/.*$/"
script:
- npm test
after_success:
- yarn coverage
jobs:
include:
- stage: release
if: branch IN (master, next)
node_js: node
script:
- npx semantic-release
env:
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": true
},
"eslint.autoFixOnSave": true,
"eslint.validate": ["javascript"],
"editor.multiCursorModifier": "ctrlCmd",
"editor.tabSize": 2,
"eslint.packageManager": "yarn",
"files.autoSave": "onFocusChange",
"gitlens.advanced.messages": {
"suppressShowKeyBindingsNotice": true
},
"emmet.syntaxProfiles": {
"html": "html"
},
"breadcrumbs.enabled": true,
"git.enableSmartCommit": true,
"git.autofetch": true
}
Loading

0 comments on commit 9beb9a2

Please sign in to comment.