Skip to content

Commit

Permalink
feat: template
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruimve committed Jan 23, 2023
1 parent 4a263ab commit d46655a
Show file tree
Hide file tree
Showing 17 changed files with 13,220 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.

module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-typescript',
// [
// '@babel/preset-react',
// { runtime: 'automatic' }
// ]
]
};
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: build
on: [push, pull_request]
jobs:
runTSCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install
- name: Typescript check
run: npm run ci
runTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install
- name: Run tests and collect coverage
run: npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
runBuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install
- name: Build resource
run: npm run build
16 changes: 16 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
push:
branches:
- master
pull_request:
branches:
- master
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: TEMPALTE-LIB-ROLLUP
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
es
types
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run ci
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Contributing

Thanks for being willing to contribute!

## How should I write my commits?

Please assumes you are using [Conventional Commit messages][conventional-commit-message].

The most important prefixes you should have in mind are:
```
fix: which represents bug fixes, and correlates to a SemVer patch.
feat: which represents a new feature, and correlates to a SemVer minor.
feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
```



[conventional-commit-message]: https://www.conventionalcommits.org
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 芮杰
Copyright (c) 2023 robot12580

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div align="center">
<h1>名称</h1>

<a href="https://github.com/robot12580">
<img
width="80"
alt="robot12580"
src="https://github.com/robot12580/materials/blob/main/images/dog2.png?raw=true"
/>
</a>

<p>描述</p>
</div>
<hr />
22 changes: 22 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
]
]
}
}
25 changes: 25 additions & 0 deletions coverage/cobertura-coverage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" ?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage lines-valid="1" lines-covered="1" line-rate="1" branches-valid="0" branches-covered="0" branch-rate="1" timestamp="1674470885615" complexity="0" version="0.1">
<sources>
<source>/Users/ruijie/Desktop/packages/TEMPALTE-LIB-ROLLUP</source>
</sources>
<packages>
<package name="main" line-rate="1" branch-rate="1">
<classes>
<class name="index.ts" filename="src/index.ts" line-rate="1" branch-rate="1">
<methods>
<method name="sum" hits="1" signature="()V">
<lines>
<line number="1" hits="1"/>
</lines>
</method>
</methods>
<lines>
<line number="2" hits="1" branch="false"/>
</lines>
</class>
</classes>
</package>
</packages>
</coverage>
Loading

0 comments on commit d46655a

Please sign in to comment.