Skip to content

Commit

Permalink
init: v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Aug 14, 2021
0 parents commit ef955e9
Show file tree
Hide file tree
Showing 214 changed files with 11,599 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
parser: 'vue-eslint-parser',
parserOptions: {
// set script parser
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
validate: [],
},
extends: [
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'plugin:prettier/recommended',
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',

'prettier/prettier': ['off', { endOfLine: 'auto' }],
},
}
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Bug report"
description: 问题报告
labels: [pending triage]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: bug-description
attributes:
label: 问题描述 / Describe the bug
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: 复现链接 / Reproduction
description: |
请提供能复现此问题的链接
Please provide a link to a repo that can reproduce the problem you ran into.
validations:
required: false
- type: textarea
id: logs
attributes:
label: 日志 / Logs
description: |
请复制错误日志,或者截图
Please copy paste the log text.
render: shell
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Questions & Discussions
url: https://github.com/reruin/sharelist/discussions
about: Use GitHub discussions for message-board style questions and discussions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Feature request"
description: 功能需求
labels: ["enhancement: pending triage"]
body:
- type: textarea
id: feature-description
attributes:
label: 需求描述 / Description of the feature
validations:
required: true
- type: textarea
id: suggested-solution
attributes:
label: 实现思路 / Suggested solution
description: 实现此需求的解决思路。
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: 附件 / Additional context
description: |
相关的任何其他上下文或截图。
Any other context or screenshots about the feature request here.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get Env
uses: actions/github-script@v4
with:
script: |
const tag = process.env.GITHUB_REF.split('/').slice(-1)[0]
const createChangelog = require('./scripts/changelog.js')
const content = await createChangelog('https://github.com/'+process.env.GITHUB_REPOSITORY)
core.exportVariable('CHANGELOG', content)
core.exportVariable('VERSION', tag)
- name: Install dependencies
run: yarn install
- name: Build
run: |
yarn build-web
mkdir -p ./packages/sharelist/theme/default
mkdir -p ./packages/sharelist/plugins
cp -r ./packages/sharelist-web/dist/* ./packages/sharelist/theme/default
cp -r ./packages/sharelist-plugin/lib/* ./packages/sharelist/plugins
yarn build-server
- name: Release
run: |
cd ./packages/sharelist/build
tar --transform='flags=r;s|sharelist-win.exe|sharelist.exe|' -zcvf sharelist_windows_amd64.tar.gz sharelist-win.exe
tar --transform='flags=r;s|sharelist-macos|sharelist|' -zcvf sharelist_macos_amd64.tar.gz sharelist-macos
tar --transform='flags=r;s|sharelist-linux|sharelist|' -zcvf sharelist_linux_amd64.tar.gz sharelist-linux
gh release create ${{ env.VERSION }} -n "${{ env.NOTE }}" -t "${{ env.VERSION }}" ${{ env.FILES }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ env.VERSION }}
NOTE: ${{ env.CHANGELOG }}
TITLE: ${{ env.VERSION }}
FILES: ./*.gz
56 changes: 56 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Docker

on:
push:
# branches:
# - next
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: yarn install

- name: Pre Build
run: |
yarn build-web
mkdir -p ./packages/sharelist/theme/default
mkdir -p ./packages/sharelist/plugins
cp -r ./packages/sharelist-web/dist/* ./packages/sharelist/theme/default
cp -r ./packages/sharelist-plugin/lib/* ./packages/sharelist/plugins
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./packages/sharelist/
platforms: linux/amd64,linux/arm64
file: ./packages/sharelist/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/sharelist:${{ env.VERSION }}
env:
VERSION: next
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
build/
dist/
/packages/sharelist/theme/
.vscode/
*.lock
*.log
*.exe
22 changes: 22 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// https://prettier.io/docs/en/configuration.html
module.exports = {
//分号终止符
semi: false,

//行尾逗号
trailingComma: "all",

// 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
singleQuote: true,

printWidth: 120,
// 换行符
endOfLine: "auto",

//缩进 default:2
tabWidth: 2,

endOfLine: "auto",

arrowParens: "avoid"
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018-present, Reruin and Sharelist contributors

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.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ShareList

[![Build Status](https://github.com/reruin/sharelist/actions/workflows/ci.yml/badge.svg?branch=next)](https://github.com/reruin/sharelist/actions/workflows/ci.yml)

ShareList 是一个易用的网盘工具,支持快速挂载 GoogleDrive、OneDrive ,可通过插件扩展功能。
新版正在开发中,欢迎[提交反馈](https://github.com/reruin/sharelist/issues/new/choose)

[查看旧版](https://github.com/reruin/sharelist/tree/0.1)

## 安装
```docker
docker run -d -v /etc/sharelist:/sharelist/cache -p 33001:33001 --name="sharelist" reruin/sharelist:next
```

[release](https://github.com/reruin/sharelist/releases)下载二进制版。


## 许可
[MIT](https://opensource.org/licenses/MIT)
Copyright (c) 2018-present, Reruin
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "sharelist-monorepo",
"private": true,
"workspaces": [
"packages/*"
],
"engines": {
"node": ">=14.0.0"
},
"scripts": {
"dev": "cd packages/sharelist && yarn dev",
"build-server": "cd packages/sharelist && yarn pkg",
"dev-web": "cd packages/sharelist-web && yarn dev",
"build-web": "cd packages/sharelist-web && yarn build",
"build": "node scripts/build.js",
"lint": "eslint --ext .ts packages/*/src/**.ts",
"format": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"",
"release": "node scripts/release.js",
"ci": "cd packages/sharelist && yarn release",
"changelog": "node scripts/changelog.js",
"pkg": "cd packages/sharelist && yarn pkg-demo"
},
"devDependencies": {
"chalk": "^4.1.2",
"conventional-changelog-cli": "^2.1.1",
"cross-env": "^7.0.3",
"eslint": "^7.28.0",
"execa": "^5.1.1",
"minimist": "^1.2.5",
"nodemon": "^2.x",
"pkg": "^5.3.1",
"prompts": "^2.4.1",
"semver": "^7.3.5"
}
}
18 changes: 18 additions & 0 deletions packages/sharelist-core/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// https://prettier.io/docs/en/configuration.html
module.exports = {
//分号终止符
semi: false,

//行尾逗号
trailingComma: "all",

// 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
singleQuote: true,

printWidth: 120,
// 换行符
endOfLine: "auto",

//缩进 default:2
tabWidth: 2
}
Empty file.
21 changes: 21 additions & 0 deletions packages/sharelist-core/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021-present, Reruin and Sharelist contributors

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.
5 changes: 5 additions & 0 deletions packages/sharelist-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @sharelist/core [![npm](https://img.shields.io/npm/v/@sharelist/core.svg)](https://npmjs.com/package/@sharelist/core)

It's a framework for mounting netdisk.

## Useage
1 change: 1 addition & 0 deletions packages/sharelist-core/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib/index')
Loading

0 comments on commit ef955e9

Please sign in to comment.