Skip to content

Commit 71765d0

Browse files
committed
Initial commit
0 parents  commit 71765d0

35 files changed

+9583
-0
lines changed

.browserslistrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
defaults
2+
maintained node versions

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist

.eslintrc.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = {
2+
root: true,
3+
// https://eslint.org/docs/user-guide/configuring#specifying-environments
4+
env: {
5+
node: true,
6+
es2020: true,
7+
},
8+
extends: [
9+
//
10+
"eslint:recommended",
11+
"plugin:prettier/recommended",
12+
],
13+
overrides: [
14+
{
15+
files: [
16+
//
17+
"./rollup.config.js",
18+
"./script-modules/**/*.js",
19+
],
20+
parserOptions: {
21+
sourceType: "module",
22+
},
23+
},
24+
{
25+
files: "*.ts",
26+
parser: "@typescript-eslint/parser",
27+
parserOptions: {
28+
tsconfigRootDir: __dirname,
29+
project: "./tsconfig.json",
30+
},
31+
plugins: ["prettier", "@typescript-eslint"],
32+
extends: [
33+
"eslint:recommended",
34+
"plugin:@typescript-eslint/eslint-recommended",
35+
"plugin:@typescript-eslint/recommended",
36+
"plugin:prettier/recommended",
37+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
38+
],
39+
rules: {
40+
"@typescript-eslint/explicit-function-return-type": "off",
41+
},
42+
},
43+
],
44+
};

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- alpha
7+
- beta
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Use Node.js
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
# https://github.com/actions/cache/blob/master/examples.md#node---yarn
19+
- name: Get yarn cache directory path
20+
id: yarn-cache-dir-path
21+
run: echo "::set-output name=dir::$(yarn cache dir)"
22+
- uses: actions/cache@v2
23+
id: yarn-cache
24+
with:
25+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27+
restore-keys: |
28+
${{ runner.os }}-yarn-
29+
- name: Install dependencies
30+
run: yarn install --frozen-lockfile
31+
- name: Ensure linted
32+
run: yarn run ensure-linted
33+
- name: Test
34+
run: yarn test
35+
- name: Build
36+
run: yarn build
37+
- name: Release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
run: yarn run semantic-release

.gitignore

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged

.lintstagedrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"*.{js,ts}": "yarn run lint:fix"
2+
"*.{md,html,css,yml,yaml,json}": "prettier --write"

.prettierrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"trailingComma": "all"

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# [1.2.0](https://github.com/tlibjs/package-template/compare/v1.1.0...v1.2.0) (2021-07-20)
2+
3+
### Features
4+
5+
- only keep one tsconfig ([204a972](https://github.com/tlibjs/package-template/commit/204a972af9e205d6313bc4ea556fe42cdb8c4bb3))
6+
- ts-node demo ([78e6738](https://github.com/tlibjs/package-template/commit/78e6738d25b6ab533aa0100d1b68a41ab9fb8180))
7+
- use typescript rollup configs ([c25cfdb](https://github.com/tlibjs/package-template/commit/c25cfdbe7b24ca82fd93b0e686d93f523a30355c))
8+
9+
# [1.1.0](https://github.com/tlibjs/package-template/compare/v1.0.0...v1.1.0) (2021-07-20)
10+
11+
### Bug Fixes
12+
13+
- auto global namespace ([33ecbf5](https://github.com/tlibjs/package-template/commit/33ecbf5165a82e3090bbf1cddc95a178569285a9))
14+
- set rollup output.exports to auto ([a2d4399](https://github.com/tlibjs/package-template/commit/a2d43992dd4ff8f35536e92c867999795a5ce30e))
15+
- should use @rollup/plugin-node-resolve and @rollup/plugin-commonjs for bundle builds ([4d7774a](https://github.com/tlibjs/package-template/commit/4d7774a739ce600213e9f6ac5efd834ea8bf3e80))
16+
17+
### Features
18+
19+
- multiple entry points ([caf97f1](https://github.com/tlibjs/package-template/commit/caf97f12c56e733af6c3364be3f3f95684ec354c))
20+
- support ie 11 ([ffe02d4](https://github.com/tlibjs/package-template/commit/ffe02d4a10a6cac7701507ea3ed9bbbd990b5a20))
21+
22+
# 1.0.0 (2021-07-18)
23+
24+
### Features
25+
26+
- example function hello ([9a4fa99](https://github.com/tlibjs/package-template/commit/9a4fa99575359aeab5748c191ae6b3dbe2d935b0))

0 commit comments

Comments
 (0)