Skip to content

Commit 2d50bc5

Browse files
committed
[add] Prototype version
0 parents  commit 2d50bc5

File tree

9 files changed

+973
-0
lines changed

9 files changed

+973
-0
lines changed

.github/workflows/main.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI & CD
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
jobs:
7+
Build-and-Publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- uses: pnpm/action-setup@v2
13+
with:
14+
version: 8
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 18
18+
registry-url: https://registry.npmjs.org
19+
cache: pnpm
20+
- name: Install Dependencies
21+
run: pnpm i --frozen-lockfile
22+
23+
- name: Build & Publish
24+
run: npm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
28+
- name: Update document
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
publish_dir: ./docs
32+
personal_token: ${{ secrets.GITHUB_TOKEN }}
33+
force_orphan: true

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
package-lock.json
3+
yarn.lock
4+
dist/

.husky/pre-commit

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

.husky/pre-push

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

ReadMe.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Get Git Folder
2+
3+
A **file downloader** based on [Git][1] CLI
4+
5+
[![CI & CD](https://github.com/idea2app/get-git-folder/actions/workflows/main.yml/badge.svg)][2]
6+
7+
[![NPM](https://nodei.co/npm/get-git-folder.png?downloads=true&downloadRank=true&stars=true)][3]
8+
9+
## Usage
10+
11+
```shell
12+
npm i get-git-folder -g
13+
14+
get-git-folder https://github.com/your-org/your-repo main your-folder
15+
```
16+
17+
[1]: https://git-scm.com/
18+
[2]: https://github.com/idea2app/get-git-folder/actions/workflows/main.yml
19+
[3]: https://nodei.co/npm/get-git-folder/

package.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "get-git-folder",
3+
"version": "0.1.0",
4+
"license": "LGPL-3.0",
5+
"author": "[email protected]",
6+
"description": "A file downloader based on Git CLI",
7+
"keywords": [
8+
"file",
9+
"download",
10+
"git",
11+
"cli"
12+
],
13+
"homepage": "https://github.com/idea2app/get-git-folder#readme",
14+
"repository": {
15+
"type": "git",
16+
"url": "git+https://github.com/idea2app/get-git-folder.git"
17+
},
18+
"bugs": {
19+
"url": "https://github.com/idea2app/get-git-folder/issues"
20+
},
21+
"type": "module",
22+
"bin": "dist/index.js",
23+
"dependencies": {
24+
"zx": "^7.2.2"
25+
},
26+
"devDependencies": {
27+
"husky": "^8.0.3",
28+
"lint-staged": "^13.2.2",
29+
"prettier": "^2.8.8",
30+
"typescript": "^5.1.3"
31+
},
32+
"prettier": {
33+
"tabWidth": 4,
34+
"trailingComma": "none",
35+
"arrowParens": "avoid",
36+
"singleQuote": true
37+
},
38+
"lint-staged": {
39+
"*.{md,json,yml,ts,tsx}": "prettier --write"
40+
},
41+
"scripts": {
42+
"prepare": "husky install",
43+
"test": "lint-staged",
44+
"build": "rm -rf dist/ && tsc",
45+
"prepublishOnly": "npm test && npm run build"
46+
}
47+
}

0 commit comments

Comments
 (0)