Skip to content

Commit

Permalink
feat: 项目初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
llq0802 committed Sep 20, 2022
1 parent cf08c1c commit e9e9f78
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 39 deletions.
11 changes: 11 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# dependencies
node_modules
# production
dist
/.vscode
lib
es
.umi
.github
scripts
webpack.config.js
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: [require.resolve('@umijs/fabric/dist/eslint')],
};
7 changes: 6 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
module.exports = require('@umijs/fabric').prettier;
const fabric = require('@umijs/fabric');

module.exports = {
...fabric.prettier,
};

3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: [require.resolve('@umijs/fabric/dist/stylelint')],
};
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
"module": "dist/esm/index.js",
"typings": "dist/esm/index.d.ts",
"gitHooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged",
"commit-msg": "fabric verify-commit"
},
"lint-staged": {
"*.{js,jsx,less,md,json}": [
"packages/**/*.{js,jsx,less,md,json}": [
"prettier --write"
],
"*.ts?(x)": [
"prettier --parser=typescript --write"
]
},
"dependencies": {
Expand All @@ -36,17 +34,20 @@
"@testing-library/jest-dom": "^5.15.1",
"@testing-library/react": "^13.0.0",
"@types/jest": "^27.0.3",
"@umijs/fabric": "^2.8.1",
"@umijs/fabric": "^3.0.0",
"@umijs/test": "^3.0.5",
"@umijs/yorkie": "^2.0.5",
"dumi": "^1.1.0",
"eslint": "7.2.0",
"father": "^4.0.0-rc.2",
"gh-pages": "^3.0.0",
"lerna": "^5.5.1",
"lint-staged": "^10.0.7",
"prettier": "^2.2.1",
"stylelint": "13.0.0",
"yorkie": "^2.0.0"
},
"workspaces": [
"packages/*"
]
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ const components = require('..');
const assert = require('assert').strict;

assert.strictEqual(components(), 'Hello from components');
console.info("components tests passed");
console.info('components tests passed');
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
module.exports = components;

function components() {
return "Hello from components";
return 'Hello from components';
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "light-design",
"name": "lighting-design",
"version": "0.1.0",
"description": "> TODO: description",
"author": "李岚清 <[email protected]>",
Expand All @@ -17,6 +17,7 @@
"es"
],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmmirror.com/"
},
"scripts": {
Expand Down
14 changes: 14 additions & 0 deletions packages/l-design/src/Button/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Button
order: 2
nav:
order: 2
path: /components
---

```tsx
const Button = () => {
return <h1>Button</h1>;
};
export default Button;
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

const Button = () => {
return <h1>Button</h1>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ const Input = ()=>{
return <h1>Input</h1>
}
```
```
Empty file added packages/l-design/src/index.tsx
Empty file.
17 changes: 0 additions & 17 deletions packages/light-design/src/Button/index.md

This file was deleted.

29 changes: 19 additions & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
{
"compilerOptions": {
"baseUrl": "./",
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"jsx": "react",
"baseUrl": "./",
"jsx": "react-jsx",
"esModuleInterop": true,
"types": ["jest"],
"experimentalDecorators": true,
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"declaration": true,
"skipLibCheck": true,
"paths": {
"@/*": ["src/*"],
"@@/*": ["src/.umi/*"],
"@@@/*": ["docs/*"]
"lighting": ["./packages/l-design/src/index.tsx"]
}
},
"include": ["src/**/*", "dosc/**/*"],
"exclude": ["node_modules", "lib", "es", "dist", "typings", "**/__test__", "test"]
"include": [
"typings.d.ts",
"**/packages/**/*",
"**/docs/**/*",
"scripts/**/*",
"**/demos",
".eslintrc.js",
"tests",
"jest.config.js",
"**/fixtures"
]
}

0 comments on commit e9e9f78

Please sign in to comment.