Skip to content

Commit

Permalink
project structure refactor finished
Browse files Browse the repository at this point in the history
  • Loading branch information
李元秋 committed Nov 12, 2019
1 parent acf62c9 commit bd8bcd6
Show file tree
Hide file tree
Showing 56 changed files with 4,432 additions and 28,356 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/dist/
4 changes: 3 additions & 1 deletion packages/final-state-rx/.eslintrc.js → .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'airbnb-base',
'react-app',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: '11',
sourceType: 'module',
},
rules: {
Expand All @@ -15,6 +16,7 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'off',
'no-dupe-class-members': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
},
settings: {
'import/resolver': {
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
**/node_modules/
**/coverage/
**/dist/
**/yarn-error.log
**/.DS_Store
**/.rts2_cache_cjs
**/.rts2_cache_esm
**/.rts2_cache_umd
**/.rts2_cache_system
.deprecated
Empty file added .prettierignore
Empty file.
File renamed without changes.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: node_js
node_js:
- "8"
- "10"
- "12"
cache: yarn
jobs:
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[![Build Status](https://travis-ci.com/final-state/final-state-monorepo.svg?branch=master)](https://travis-ci.com/final-state/final-state-monorepo)
[![codecov.io](https://codecov.io/gh/final-state/final-state-monorepo/branch/master/graph/badge.svg)](https://codecov.io/gh/final-state/final-state-monorepo)
[![Known Vulnerabilities](https://snyk.io/test/github/final-state/final-state-monorepo/badge.svg)](https://snyk.io/test/github/final-state/final-state-monorepo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
27 changes: 26 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,32 @@
"author": "[email protected]",
"license": "MIT",
"private": true,
"husky": {
"hooks": {
"pre-commit": "lerna bootstrap"
}
},
"devDependencies": {
"lerna": "^3.14.1"
"@types/jest": "^24.0.22",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@typescript-eslint/parser": "^2.6.1",
"babel-eslint": "^10.0.3",
"eslint": "6.1.0",
"eslint-config-airbnb": "18.0.1",
"eslint-config-airbnb-base": "14.0.0",
"eslint-config-prettier": "^6.5.0",
"eslint-config-react-app": "^5.0.2",
"eslint-plugin-flowtype": "3.x",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^1.7.0",
"husky": "^3.0.9",
"lerna": "^3.14.1",
"prettier": "^1.19.1",
"tsdx": "^0.11.0",
"tslib": "^1.10.0",
"typescript": "^3.7.2"
}
}
2 changes: 0 additions & 2 deletions packages/final-state-logger/.eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions packages/final-state-logger/.eslintrc.js

This file was deleted.

8 changes: 0 additions & 8 deletions packages/final-state-logger/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions packages/final-state-logger/.prettierignore

This file was deleted.

13 changes: 0 additions & 13 deletions packages/final-state-logger/.travis.yml

This file was deleted.

9 changes: 5 additions & 4 deletions packages/final-state-logger/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[![Build Status](https://travis-ci.com/final-state/final-state-logger.svg?branch=master)](https://travis-ci.com/final-state/final-state-logger)
[![codecov.io](https://codecov.io/gh/final-state/final-state-logger/branch/master/graph/badge.svg)](https://codecov.io/gh/final-state/final-state-logger)
[![Known Vulnerabilities](https://snyk.io/test/github/final-state/final-state-logger/badge.svg)](https://snyk.io/test/github/final-state/final-state-logger)
[![minified + gzip](https://badgen.net/bundlephobia/minzip/[email protected])](https://bundlephobia.com/[email protected])
[![Build Status](https://travis-ci.com/final-state/final-state-monorepo.svg?branch=master)](https://travis-ci.com/final-state/final-state-monorepo)
[![codecov.io](https://codecov.io/gh/final-state/final-state-monorepo/branch/master/graph/badge.svg)](https://codecov.io/gh/final-state/final-state-monorepo)
[![Known Vulnerabilities](https://snyk.io/test/github/final-state/final-state-monorepo/badge.svg)](https://snyk.io/test/github/final-state/final-state-monorepo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
[![minified + gzip](https://badgen.net/bundlephobia/minzip/[email protected])](https://bundlephobia.com/[email protected])

# final-state-logger

Expand Down
37 changes: 9 additions & 28 deletions packages/final-state-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,29 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/final-state/final-state-logger"
"url": "https://github.com/final-state/final-state-monorepo"
},
"homepage": "https://final-state.github.io/final-state-logger",
"homepage": "https://github.com/final-state/final-state-monorepo/tree/master/packages/final-state-logger",
"files": [
"dist"
],
"scripts": {
"lint": "eslint -c .eslintrc.js --ext ts src",
"pub": "bash scripts/pub.sh",
"lint": "../../node_modules/.bin/eslint -c ../../.eslintrc.js --ext ts src",
"prepublish": "yarn lint && node scripts/update-readme.js",
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test --coverage"
},
"peerDependencies": {
"date-fns": "^2.0.0"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
"date-fns": "^2.0.0",
"final-state": "^1.1.3"
},
"devDependencies": {
"@types/jest": "^24.0.15",
"@typescript-eslint/eslint-plugin": "^2.1.0",
"@typescript-eslint/parser": "^2.1.0",
"date-fns": "^2.0.1",
"eslint": "6.1.0",
"eslint-config-airbnb-base": "14.0.0",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.0",
"final-state": "^1.1.1",
"husky": "^2.4.1",
"immer": "^3.2.0",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"tsdx": "^0.7.2",
"tslib": "^1.10.0",
"typescript": "^3.6.2"
"@types/deep-diff": "^1.0.0",
"date-fns": "^2.7.0",
"final-state": "^1.1.3"
},
"dependencies": {
"@types/deep-diff": "^1.0.0",
"deep-diff": "^1.0.2"
}
}
14 changes: 0 additions & 14 deletions packages/final-state-logger/scripts/pub.sh

This file was deleted.

12 changes: 8 additions & 4 deletions packages/final-state-logger/scripts/update-readme.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
const { readFile, writeFile } = require('fs');
const { argv } = require('process');
const { env } = require('process');

const version = argv[2];
const { npm_package_version: version, npm_package_name: name } = env;

if (version === undefined) {
throw '未知版本号';
}

readFile('./README.md', (err1, buf1) => {
if (err1) {
Expand All @@ -10,8 +14,8 @@ readFile('./README.md', (err1, buf1) => {
const text = buf1
.toString()
.replace(
/final-state-logger@\d+\.\d+\.\d+/g,
`final-state-logger@${version}`,
new RegExp(`${name}@\\d+\\.\\d+\\.\\d+`, 'g'),
`${name}@${version}`,
);

writeFile('./README.md', text, err2 => {
Expand Down
Loading

0 comments on commit bd8bcd6

Please sign in to comment.