-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to monorepo for react/vue support
- Loading branch information
1 parent
97f9c3d
commit 0d8ada9
Showing
77 changed files
with
3,942 additions
and
951 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['react-refresh'], | ||
rules: { | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
env: { | ||
node: true, | ||
}, | ||
} | ||
// eslint will auto add `eslint-config` for a no scope package(which not start with '@' chart), so here use absolute file path | ||
extends: [require.resolve("project-tool/baseLint")], | ||
ignorePatterns: ["dist", "dev"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/node_modules | ||
**/dist | ||
**/dev | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"printWidth": 160 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 MrWangJustToDo | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,35 @@ | ||
{ | ||
"name": "git-diff-view", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"license": "MIT", | ||
"author": "MrWangJustToDo", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"preview": "vite preview" | ||
"build:packages": "ts-node ./scripts/build.ts", | ||
"dev:react": "cd ui/react-example && pnpm run dev", | ||
"build:react": "cd ui/react-example && pnpm run build", | ||
"lint": "eslint --cache --ext ts,tsx .", | ||
"lint:fix": "pnpm run lint --fix", | ||
"prettier": "prettier --ignore-path .prettierignore --write .", | ||
"clean": "pnpm -p -r -c exec rm -rf dist dev .cache", | ||
"purge": "pnpm -p -r -c exec rm -rf node_modules" | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@my-react/react": "0.3.0", | ||
"@my-react/react-dom": "0.3.0", | ||
"highlight.js": "^11.9.0", | ||
"lodash": "^4.17.21", | ||
"lowlight": "^3.1.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"reactivity-store": "^0.3.1" | ||
}, | ||
"devDependencies": { | ||
"@my-react/react-refresh": "0.3.0", | ||
"@my-react/react-vite": "0.0.3", | ||
"@swc/core": "^1.3.100", | ||
"@types/lodash": "^4.14.202", | ||
"@types/react": "^18.2.43", | ||
"@types/react-dom": "^18.2.17", | ||
"@typescript-eslint/eslint-plugin": "^6.14.0", | ||
"@typescript-eslint/parser": "^6.14.0", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"@types/node": "^20.11.5", | ||
"@types/react": "^18.2.45", | ||
"autoprefixer": "^10.4.16", | ||
"eslint": "^8.55.0", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-react-refresh": "^0.4.5", | ||
"husky": "^8.0.2", | ||
"postcss": "^8.4.33", | ||
"prettier": "^3.2.4", | ||
"project-tool": "https://github.com/MrWangJustToDo/project-tool.git", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.0.8" | ||
"ts-node": "^10.9.2", | ||
"tslib": "^2.6.2", | ||
"typescript": "^5.3.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 MrWangJustToDo | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./dist/types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"use strict"; | ||
|
||
if (process.env.NODE_ENV === "production") { | ||
module.exports = require("./dist/cjs/index.production"); | ||
} else { | ||
module.exports = require("./dist/cjs/index.development"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"name": "@git-diff-view/core", | ||
"description": "@git-diff-view/core", | ||
"author": "MrWangJustToDo", | ||
"license": "MIT", | ||
"version": "0.0.1", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"unpkg": "./dist/umd/index.development.js", | ||
"jsdelivr": "./dist/umd/index.development.js", | ||
"files": [ | ||
"dist", | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/MrWangJustToDo/git-diff-view", | ||
"directory": "packages/core" | ||
}, | ||
"homepage": "https://github.com/MrWangJustToDo/git-diff-view", | ||
"exports": { | ||
".": { | ||
"require": "./index.js", | ||
"types": "./index.d.ts", | ||
"import": "./dist/esm/index.mjs" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"buildOptions": { | ||
"input": "./src/index.ts", | ||
"output": [ | ||
{ | ||
"dir": "./dist", | ||
"entryFileNames": "cjs/index.js", | ||
"format": "cjs", | ||
"type": true, | ||
"multiple": true, | ||
"sourcemap": true | ||
}, | ||
{ | ||
"dir": "./dist", | ||
"entryFileNames": "esm/index.mjs", | ||
"format": "esm", | ||
"sourcemap": true | ||
} | ||
] | ||
}, | ||
"keywords": [ | ||
"diff", | ||
"diff parse" | ||
], | ||
"dependencies": { | ||
"lowlight": "^3.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.