mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2024-11-21 03:15:49 +08:00
init core package
This commit is contained in:
parent
322e72b1ef
commit
cd8014c4eb
4
.gitignore
vendored
4
.gitignore
vendored
@ -7,3 +7,7 @@
|
||||
*.log.*
|
||||
|
||||
node_modules
|
||||
|
||||
# dist
|
||||
lib
|
||||
tsconfig.tsbuildinfo
|
||||
|
16
config/jest.config.js
Normal file
16
config/jest.config.js
Normal file
@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
transform: {
|
||||
".ts": "ts-jest",
|
||||
},
|
||||
globals: {
|
||||
"ts-jest": {
|
||||
diagnostics: false,
|
||||
},
|
||||
},
|
||||
moduleFileExtensions: ["ts", "js"],
|
||||
testMatch: ["<rootDir>/__tests__/**/**.spec.ts"],
|
||||
testPathIgnorePatterns: ["/node_modules/", "/lib/", "<rootDir>/lib/"],
|
||||
collectCoverage: Boolean(process.env.COVERAGE),
|
||||
collectCoverageFrom: ["<rootDir>/src/**/*.ts"],
|
||||
coveragePathIgnorePatterns: ["generated"],
|
||||
};
|
11
config/tsconfig.base.json
Normal file
11
config/tsconfig.base.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"strict": true,
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
18
package.json
18
package.json
@ -5,6 +5,22 @@
|
||||
"lerna": "lerna"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lerna": "^4.0.0"
|
||||
"husky": "^6.0.0",
|
||||
"lerna": "^4.0.0",
|
||||
"lint-staged": "^11.0.0"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"packages/**/!(generated)/*.{js,ts,tsx,yml,json}": [
|
||||
"prettier --write",
|
||||
"git add"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
11
packages/core/README.md
Normal file
11
packages/core/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
# `@meta-ui/core`
|
||||
|
||||
> TODO: description
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
const core = require('@meta-ui/core');
|
||||
|
||||
// TODO: DEMONSTRATE API
|
||||
```
|
3
packages/core/jest.config.js
Normal file
3
packages/core/jest.config.js
Normal file
@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
...require("../../config/jest.config"),
|
||||
};
|
41
packages/core/package.json
Normal file
41
packages/core/package.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "@meta-ui/core",
|
||||
"version": "0.1.0",
|
||||
"description": "meta-ui core runtime",
|
||||
"author": "Yanzhen Yu <yanzhen@smartx.com>",
|
||||
"homepage": "https://github.com/webzard-io/meta-ui#readme",
|
||||
"license": "MIT",
|
||||
"main": "lib/core.js",
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/webzard-io/meta-ui.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -b .",
|
||||
"typings": "tsc -d --emitDeclarationOnly --declarationDir typings",
|
||||
"test": "jest",
|
||||
"lint": "eslint src --ext .ts",
|
||||
"prepublish": "npm run build && npm run typings"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/webzard-io/meta-ui/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.23",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.1",
|
||||
"@typescript-eslint/parser": "^4.28.1",
|
||||
"eslint": "^7.29.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"jest": "^27.0.6",
|
||||
"prettier": "^2.3.2",
|
||||
"ts-jest": "^27.0.3",
|
||||
"typescript": "^4.3.5"
|
||||
}
|
||||
}
|
0
packages/core/src/index.ts
Normal file
0
packages/core/src/index.ts
Normal file
12
packages/core/tsconfig.json
Normal file
12
packages/core/tsconfig.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../../config/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"outDir": "lib",
|
||||
"lib": ["es6"],
|
||||
"composite": true,
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["__tests__/**/*.ts"]
|
||||
}
|
8
tsconfig.json
Normal file
8
tsconfig.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./config/tsconfig.base.json",
|
||||
"references": [
|
||||
{
|
||||
"path": "./packages/core"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user