From babcab0f4085161ab82a8524fa8cbbfda2e4844c Mon Sep 17 00:00:00 2001 From: Zongmin Lei Date: Mon, 3 Sep 2018 11:51:16 +0800 Subject: [PATCH] init --- .gitignore | 2 ++ .prettierrc.js | 5 +++++ README.md | 41 ++++++++++++++++++++++++++++++++++++++++- package.json | 40 ++++++++++++++++++++++++++++++++++++++++ src/lib/index.ts | 15 +++++++++++++++ tsconfig.json | 16 ++++++++++++++++ 6 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 .prettierrc.js create mode 100644 package.json create mode 100644 src/lib/index.ts create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index ad46b30..e4f46fd 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,5 @@ typings/ # next.js build output .next + +dist diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..4c442f4 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,5 @@ +// .prettierrc.js +module.exports = { + printWidth: 120, + trailingComma: "all", +}; diff --git a/README.md b/README.md index e6e8d70..11dcb65 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,41 @@ -# schema-manager +# @tuzhanai/schema-manager + 数据Schema管理器 + +## 安装 + +```bash +npm i @tuzhanai/schema-manager -S +``` + +## 使用方法 + +```typescript + +``` + +## License + +```text +MIT License + +Copyright (c) 2018 兔展 + +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. +``` diff --git a/package.json b/package.json new file mode 100644 index 0000000..9c3419c --- /dev/null +++ b/package.json @@ -0,0 +1,40 @@ +{ + "name": "@tuzhanai/schema-manager", + "version": "1.0.0", + "description": "数据Schema管理器", + "main": "dist/lib/index.js", + "typings": "dist/lib/index.d.ts", + "files": [ + "dist/lib" + ], + "scripts": { + "test": "mocha --require ts-node/register src/test/**/*.spec.ts", + "prepublish": "npm test && rm -rf dist && tsc" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/tuzhanai/schema-manager.git" + }, + "keywords": [ + "schema", + "manager" + ], + "author": "Zongmin Lei ", + "license": "MIT", + "bugs": { + "url": "https://github.com/tuzhanai/schema-manager/issues" + }, + "homepage": "https://github.com/tuzhanai/schema-manager#readme", + "devDependencies": { + "@types/chai": "^4.1.4", + "@types/mocha": "^5.2.5", + "chai": "^4.1.2", + "mocha": "^5.2.0", + "ts-node": "^7.0.1", + "typescript": "^3.0.3" + }, + "dependencies": { + "@tuzhanai/value-type-manager": "^1.0.1", + "@types/node": "^10.9.4" + } +} diff --git a/src/lib/index.ts b/src/lib/index.ts new file mode 100644 index 0000000..83d7de8 --- /dev/null +++ b/src/lib/index.ts @@ -0,0 +1,15 @@ +/** + * @tuzhanai/schema-manager + * + * @author Zongmin Lei + */ + +import ValueTypeManager from "@tuzhanai/value-type-manager"; + +export interface SchemaManagerOptions {} + +export class SchemaManager { + constructor(protected readonly options: SchemaManagerOptions = {}) {} +} + +export default SchemaManager; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..c1a9fce --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "commonjs", + "moduleResolution": "node", + "esModuleInterop": true, + "rootDir": "src", + "outDir": "dist", + "strict": true, + "noUnusedLocals": true, + "pretty": true, + "experimentalDecorators": true, + "sourceMap": false, + "declaration": true + } +}