Skip to content

Commit 3baa9b3

Browse files
authored
Initial commit
0 parents  commit 3baa9b3

File tree

21 files changed

+279
-0
lines changed

21 files changed

+279
-0
lines changed

.eslintignore

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

.eslintrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "@artus/eslint-config-artus/typescript",
3+
"parserOptions": {
4+
"project": "./tsconfig.json",
5+
"createDefaultProgram": true
6+
}
7+
}

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
7+
pull_request:
8+
branches: [ master, main, next, beta, "*.x" ]
9+
10+
schedule:
11+
- cron: '0 2 * * *'
12+
13+
workflow_dispatch: {}
14+
15+
jobs:
16+
Job:
17+
name: Node.js
18+
uses: artusjs/github-actions/.github/workflows/node-test.yml@master
19+
# pass these inputs only if you need to custom
20+
# with:
21+
# os: 'ubuntu-latest, macos-latest, windows-latest'
22+
# version: '16, 18'

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release
2+
on:
3+
# 合并后自动发布
4+
# push:
5+
# branches: [ master, main, next, beta, '*.x' ]
6+
7+
# 手动发布
8+
workflow_dispatch: {}
9+
10+
jobs:
11+
release:
12+
name: Node.js
13+
uses: artusjs/github-actions/.github/workflows/node-release.yml@v1
14+
secrets:
15+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
16+
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
17+
# with:
18+
# checkTest: false
19+
# dryRun: true

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
dist/
3+
coverage/
4+
*-lock*[.yaml, .json]
5+
**/*.js
6+
**/*.js.map
7+
**/*.d.ts

.mocharc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
spec: test/**/*.test.ts
2+
extension: ts
3+
require: ts-node/register
4+
timeout: 120000
5+
exclude: test/fixtures/

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 artus-cli
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# artus-cli/template
2+
3+
template repository for artus-cli
4+
5+
<!-- Badge,自行替换掉下面的 `artus-cli/artus-cli` 占位符-->
6+
7+
[![NPM version](https://img.shields.io/npm/v/@artus-cli/artus-cli.svg?style=flat-square)](https://npmjs.org/package/@artus-cli/artus-cli)
8+
[![NPM quality](https://img.shields.io/npms-io/final-score/@artus-cli/artus-cli.svg?style=flat-square)](https://npmjs.org/package/@artus-cli/artus-cli)
9+
[![NPM download](https://img.shields.io/npm/dm/@artus-cli/artus-cli.svg?style=flat-square)](https://npmjs.org/package/@artus-cli/artus-cli)
10+
[![Continuous Integration](https://github.com/artus-cli/artus-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/artus-cli/artus-cli/actions/workflows/ci.yml)
11+
[![Test coverage](https://img.shields.io/codecov/c/github/artus-cli/artus-cli.svg?style=flat-square)](https://codecov.io/gh/artus-cli/artus-cli)
12+
[![Oss Insight Analytics](https://img.shields.io/badge/OssInsight-artus--cli%2Fartus--cli-blue.svg?style=flat-square)](https://ossinsight.io/analyze/artus-cli/artus-cli)
13+
14+
15+
## Install
16+
17+
```sh
18+
$ npm i -D @artus-cli/artus-cli
19+
```
20+
21+
## Usage
22+
23+
```ts
24+
// plugin.ts
25+
26+
export default {
27+
template: {
28+
enable: true,
29+
package: 'artus-cli/artus-cli',
30+
},
31+
};
32+
```
33+
34+
## Commands
35+
36+
### dev
37+
38+
39+
### debug
40+
41+
42+
## Contributing
43+
44+
```sh
45+
$ npm test
46+
$ npm run cov
47+
```

package.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "template-plugin",
3+
"version": "0.0.0",
4+
"description": "plugin template",
5+
"homepage": "",
6+
"author": "",
7+
"main": "dist/index.js",
8+
"types": "dist/index.d.ts",
9+
"type": "commonjs",
10+
"exports": {
11+
".": {
12+
"import": "./dist/index.js",
13+
"require": "./dist/index.js"
14+
},
15+
"./package.json": "./package.json"
16+
},
17+
"scripts": {
18+
"lint": "eslint . --ext .ts",
19+
"postlint": "tsc --noEmit",
20+
"test": "mocha",
21+
"cov": "c8 -n src/ npm test",
22+
"ci": "npm run cov",
23+
"tsc": "rm -rf dist && tsc",
24+
"prepack": "npm run tsc"
25+
},
26+
"dependencies": {
27+
"tslib": "^2.4.0"
28+
},
29+
"devDependencies": {
30+
"@artus-cli/artus-cli": "latest",
31+
"@artus/eslint-config-artus": "^0.0.1",
32+
"@artus/tsconfig": "^1",
33+
"@types/mocha": "^9.1.1",
34+
"@types/node": "^18.7.14",
35+
"c8": "^7.12.0",
36+
"coffee": "^5.5.0",
37+
"eslint": "^8.28.0",
38+
"mocha": "^10.0.0",
39+
"ts-mocha": "^10.0.0",
40+
"ts-node": "^10.9.1",
41+
"tsconfig-paths": "^4.1.1",
42+
"typescript": "^4.8.2"
43+
},
44+
"repository": {
45+
"type": "git",
46+
"url": ""
47+
},
48+
"files": [
49+
"dist"
50+
],
51+
"publishConfig": {
52+
"access": "public"
53+
},
54+
"keywords": [
55+
"artus",
56+
"artus-cli",
57+
"artus-cli-plugin",
58+
"command-line-app",
59+
"cli",
60+
"commander"
61+
],
62+
"license": "MIT"
63+
}

0 commit comments

Comments
 (0)