-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 699347c
Showing
23 changed files
with
7,626 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,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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,10 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
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,3 @@ | ||
/dist | ||
web_modules | ||
.prettierrc.js |
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,82 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
// commonjs: true, | ||
es6: true, | ||
node: true, | ||
jest: true | ||
}, | ||
plugins: [ | ||
'@typescript-eslint/eslint-plugin', | ||
'eslint-plugin-tsdoc', | ||
'prettier' | ||
], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:jest/recommended', | ||
'prettier' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
sourceType: 'module' | ||
}, | ||
rules: { | ||
'tsdoc/syntax': 'warn', | ||
// 'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': ['off', { argsIgnorePattern: '^_' }], | ||
'generator-star-spacing': ['error', { before: false, after: true }], | ||
'space-before-function-paren': 'off', | ||
'no-dupe-class-members': 'off', | ||
'no-useless-constructor': 'off', | ||
'@typescript-eslint/no-useless-constructor': 'off', | ||
'prettier/prettier': ['error'], | ||
'lines-between-class-members': ['error', 'always'], | ||
'padding-line-between-statements': [ | ||
'error', | ||
{ blankLine: 'always', prev: '*', next: 'return' } | ||
], | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
'error', | ||
{ | ||
allowExpressions: true, | ||
allowTypedFunctionExpressions: true | ||
} | ||
], | ||
'@typescript-eslint/explicit-member-accessibility': [ | ||
'error', | ||
{ | ||
accessibility: 'no-public' | ||
} | ||
], | ||
'@typescript-eslint/ban-ts-comment': [ | ||
'error', | ||
{ | ||
'ts-expect-error': 'allow-with-description' | ||
} | ||
], | ||
'@typescript-eslint/no-non-null-assertion': [2], | ||
'@typescript-eslint/member-delimiter-style': [ | ||
'error', | ||
{ | ||
multiline: { | ||
delimiter: 'none', | ||
requireLast: false | ||
}, | ||
singleline: { | ||
delimiter: 'semi', | ||
requireLast: false | ||
} | ||
} | ||
] | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.js', '*.jsx'], | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-var-requires': 'off' | ||
} | ||
} | ||
] | ||
} |
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,80 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
jobs: | ||
build: | ||
name: Node unit tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ['12', '14', '16'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache .pnpm-store | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install dependencies | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
run_install: true | ||
|
||
- name: Lint source | ||
run: | | ||
pnpm lint:ci | ||
- name: Build package | ||
run: | | ||
pnpm build | ||
- name: Run tests | ||
run: | | ||
pnpm test:ci | ||
env: | ||
CI: true | ||
|
||
- name: Generate Code Coverage | ||
# only when running in node v16 | ||
if: matrix.node == 16 | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: 'Consume changesets' | ||
if: github.event_name == 'push' && github.repository == 'ivandotv/untilted' && matrix.node == 16 && github.ref == 'refs/heads/main' | ||
uses: changesets/action@v1 | ||
id: 'changesets' | ||
with: | ||
# This expects you to have a script called release which does a build for your packages and calls changeset publish | ||
publish: pnpm release | ||
commit: version bump | ||
title: Next release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: 'Generate docs' | ||
if: steps.changesets.outputs.published == 'true' | ||
run: pnpm gen:docs | ||
|
||
- name: Commit docs | ||
if: steps.changesets.outputs.published == 'true' | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'Generate docs' |
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,10 @@ | ||
node_modules/ | ||
coverage/ | ||
dist/ | ||
/.buildcache | ||
/.vscode/settings.json | ||
/scratch | ||
/reports | ||
scratch | ||
*.tsbuildinfo | ||
.pnpm-debug.log |
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" | ||
|
||
pnpm 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,10 @@ | ||
{ | ||
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [ | ||
"eslint --fix", | ||
"prettier --ignore-unknown --write" | ||
], | ||
"tests/**/*.{js,jsx,ts,tsx,json}": [ | ||
"eslint --fix", | ||
"prettier --ignore-unknown --write" | ||
] | ||
} |
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,6 @@ | ||
module.exports = { | ||
semi: false, | ||
singleQuote: true, | ||
trailingComma: 'none', | ||
endOfLine: 'lf' | ||
} |
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 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Main", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/index.ts", | ||
// "preLaunchTask": "npm: build:cjs", | ||
"outFiles": ["${workspaceFolder}/dist/cjs/**/*.js"], | ||
"skipFiles": [ | ||
"${workspaceFolder}/node_modules/**/*.js", | ||
"<node_internals>/**/*.js" | ||
] | ||
}, | ||
{ | ||
"name": "Current test file", | ||
"type": "node", | ||
"request": "launch", | ||
"cwd": "${workspaceRoot}", | ||
// "program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js", //pnpm fix | ||
"args": [ | ||
"${relativeFile}", | ||
"--no-cache", | ||
"--watchAll=false", | ||
"--runInBand" | ||
], | ||
"console": "integratedTerminal", | ||
"protocol": "inspector", | ||
"internalConsoleOptions": "neverOpen", | ||
"disableOptimisticBPs": true, | ||
"skipFiles": [ | ||
"${workspaceFolder}/node_modules/**/*.js", | ||
"<node_internals>/**/*.js" | ||
] | ||
}, | ||
{ | ||
"name": "Nodemon", | ||
"type": "node", | ||
"request": "attach", | ||
"processId": "${command:PickProcess}", | ||
"restart": true, | ||
"protocol": "inspector", | ||
"skipFiles": [ | ||
"${workspaceFolder}/node_modules/**/*.js", | ||
"<node_internals>/**/*.js" | ||
], | ||
// "localRoot": "${workspaceFolder}/src/regexparam", | ||
// "remoteRoot": "/", | ||
"stopOnEntry": true | ||
} | ||
] | ||
} |
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 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Ivan V. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
# Microbundle Typescript Template |
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 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
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,32 @@ | ||
untilted | ||
|
||
# untilted | ||
|
||
## Table of contents | ||
|
||
### Functions | ||
|
||
- [demo](README.md#demo) | ||
|
||
## Functions | ||
|
||
### demo | ||
|
||
▸ **demo**(): `void` | ||
|
||
Demo function for template repository | ||
|
||
**`remarks`** | ||
Read more about TSDoc at: [https://github.com/microsoft/tsdoc](https://github.com/microsoft/tsdoc) | ||
|
||
**`beta`** | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
Nothing! | ||
|
||
#### Defined in | ||
|
||
[index.ts:12](https://github.com/ivandotv/microbundle-template/blob/dffd33e/src/index.ts#L12) |
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,30 @@ | ||
module.exports = { | ||
testMatch: [ | ||
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)', | ||
'<rootDir>/tests/?(*.)+(spec|test).[jt]s?(x)' | ||
], | ||
testEnvironment: 'node', | ||
moduleDirectories: ['node_modules', 'src'], | ||
moduleNameMapper: { | ||
'~/(.*)': '<rootDir>/src/$1' | ||
}, | ||
watchPlugins: [ | ||
'jest-watch-typeahead/filename', | ||
'jest-watch-typeahead/testname' | ||
], | ||
collectCoverageFrom: [ | ||
'<rootDir>/src/**', | ||
'!<rootDir>/src/index.ts', | ||
'!<rootDir>/src/globals.d.ts', | ||
'!<rootDir>/src/__tests__/**', | ||
'!<rootDir>/src/__fixtures__/**' | ||
], | ||
coverageThreshold: { | ||
global: { | ||
branches: 80, | ||
functions: 80, | ||
lines: 80, | ||
statements: 80 | ||
} | ||
} | ||
} |
Oops, something went wrong.