Skip to content

Commit ad7260c

Browse files
committed
feat(platform): add test route
1 parent ba8e5c3 commit ad7260c

File tree

103 files changed

+3186
-1438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+3186
-1438
lines changed

.stylelintrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88
"rules": {
99
"custom-property-pattern": null,
1010
"no-invalid-position-at-import-rule": null,
11-
"selector-class-pattern": null
11+
"selector-class-pattern": null,
12+
"block-no-empty": null,
13+
"selector-pseudo-class-no-unknown": [
14+
true,
15+
{
16+
"ignorePseudoClasses": ["global"]
17+
}
18+
]
1219
},
1320
"overrides": [
1421
{

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,40 @@
2626
"@ant-design/icons-svg": "^4.2.1",
2727
"@commitlint/cli": "^17.1.2",
2828
"@commitlint/config-conventional": "^17.1.0",
29-
"@nrwl/cli": "14.6.5",
30-
"@nrwl/eslint-plugin-nx": "14.6.5",
31-
"@nrwl/jest": "14.6.5",
32-
"@nrwl/linter": "14.6.5",
29+
"@nrwl/cli": "14.7.6",
30+
"@nrwl/eslint-plugin-nx": "14.7.6",
31+
"@nrwl/jest": "14.7.6",
32+
"@nrwl/linter": "14.7.6",
3333
"@nrwl/nx-cloud": "14.6.2",
34-
"@nrwl/react": "14.6.5",
35-
"@nrwl/tao": "14.6.5",
36-
"@nrwl/web": "14.6.5",
37-
"@nrwl/workspace": "14.6.5",
34+
"@nrwl/react": "14.7.6",
35+
"@nrwl/tao": "14.7.6",
36+
"@nrwl/web": "14.7.6",
37+
"@nrwl/workspace": "14.7.6",
3838
"@stackblitz/sdk": "^1.8.0",
3939
"@testing-library/jest-dom": "^5.16.5",
4040
"@testing-library/react": "^13.4.0",
4141
"@types/fs-extra": "^9.0.13",
4242
"@types/glob": "^8.0.0",
4343
"@types/jest": "^27.4.1",
44-
"@types/lodash": "^4.14.182",
44+
"@types/lodash": "^4.14.185",
4545
"@types/marked": "^4.0.7",
4646
"@types/mocha": "^9.1.1",
47-
"@types/node": "^18.7.16",
48-
"@types/react": "^18.0.18",
47+
"@types/node": "^18.7.18",
48+
"@types/react": "^18.0.20",
4949
"@types/react-dom": "^18.0.6",
5050
"@types/vscode": "^1.71.0",
5151
"@types/yaml-front-matter": "^4.1.0",
52-
"@typescript-eslint/eslint-plugin": "^5.36.2",
53-
"@typescript-eslint/parser": "^5.36.2",
52+
"@typescript-eslint/eslint-plugin": "^5.38.0",
53+
"@typescript-eslint/parser": "^5.38.0",
5454
"@vscode/test-electron": "^2.1.5",
5555
"axios": "^0.27.2",
5656
"axios-mock-adapter": "^1.21.2",
5757
"babel-jest": "^27.5.1",
5858
"codesandbox": "^2.2.3",
5959
"colors": "^1.4.0",
60-
"core-js": "^3.25.1",
60+
"core-js": "^3.25.2",
6161
"dayjs": "^1.11.5",
62-
"eslint": "^8.23.0",
62+
"eslint": "^8.23.1",
6363
"eslint-config-prettier": "^8.5.0",
6464
"eslint-plugin-import": "^2.26.0",
6565
"eslint-plugin-jsdoc": "^39.3.6",
@@ -68,41 +68,41 @@
6868
"eslint-plugin-prettier": "^4.2.1",
6969
"eslint-plugin-react": "^7.31.8",
7070
"eslint-plugin-react-hooks": "^4.6.0",
71-
"eslint-plugin-tsdoc": "^0.2.16",
71+
"eslint-plugin-tsdoc": "^0.2.17",
7272
"fs-extra": "^10.1.0",
7373
"glob": "^8.0.3",
7474
"highlight.js": "^11.6.0",
7575
"husky": "^8.0.1",
76-
"i18next": "^21.9.0",
76+
"i18next": "^21.9.2",
7777
"immer": "^9.0.15",
7878
"is-builtin-module": "^3.2.0",
7979
"jest": "^27.5.1",
80-
"lerna": "^5.5.0",
80+
"lerna": "^5.5.1",
8181
"lodash": "^4.17.21",
8282
"marked": "^4.1.0",
8383
"mocha": "^10.0.0",
84-
"nx": "14.6.5",
84+
"nx": "14.7.6",
8585
"postcss-html": "^1.5.0",
8686
"postcss-markdown": "^1.2.0",
8787
"prettier": "^2.7.1",
8888
"react": "^18.2.0",
8989
"react-dom": "^18.2.0",
90-
"react-i18next": "^11.18.5",
91-
"react-router-dom": "^6.3.0",
90+
"react-i18next": "^11.18.6",
91+
"react-router-dom": "^6.4.0",
9292
"react-test-renderer": "^18.2.0",
9393
"regenerator-runtime": "^0.13.9",
9494
"rfs": "^9.0.6",
9595
"rxjs": "^7.5.6",
9696
"rxjs-for-await": "^1.0.0",
9797
"sass": "^1.54.9",
9898
"sort-package-json": "^1.57.0",
99-
"stylelint": "^14.10.0",
99+
"stylelint": "^14.12.0",
100100
"stylelint-config-prettier": "^9.0.3",
101101
"stylelint-config-recess-order": "^3.0.0",
102102
"stylelint-config-recommended-scss": "^7.0.0",
103103
"stylelint-config-standard": "^28.0.0",
104104
"stylelint-scss": "^4.3.0",
105-
"swiper": "^8.3.2",
105+
"swiper": "^8.4.2",
106106
"table": "^6.8.0",
107107
"ts-jest": "^27.1.4",
108108
"ts-node": "^10.9.1",

packages/hooks/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"options": {
1111
"outputPath": "dist/packages/hooks",
1212
"tsConfig": "packages/hooks/tsconfig.lib.json",
13+
"rootDir": "packages/hooks/src",
1314
"main": "packages/hooks/src/index.ts",
1415
"updateBuildableProjectDepsInPackageJson": false,
1516
"assets": [

packages/hooks/tsconfig.lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
"**/*.spec.jsx",
1717
"**/*.test.jsx"
1818
],
19-
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
19+
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
2020
}

packages/icons/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"options": {
1111
"outputPath": "dist/packages/icons",
1212
"tsConfig": "packages/icons/tsconfig.lib.json",
13+
"rootDir": "packages/icons/src",
1314
"main": "packages/icons/src/index.ts",
1415
"updateBuildableProjectDepsInPackageJson": false,
1516
"assets": [

packages/icons/tsconfig.lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
"**/*.spec.jsx",
1717
"**/*.test.jsx"
1818
],
19-
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
19+
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
2020
}

packages/platform/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2-
"name": "platform",
2+
"name": "rd-platform",
33
"version": "0.0.1",
44
"private": true,
55
"description": "An out-of-box solution for enterprise applications as a React boilerplate",
66
"keywords": [
77
"react",
88
"devui",
99
"admin",
10-
"platform"
10+
"platform",
11+
"rd-platform"
1112
],
1213
"homepage": "https://github.com/DevCloudFE/react-devui/tree/main/packages/platform#readme",
1314
"bugs": {

packages/platform/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"assets": ["packages/platform/src/assets"],
1919
"styles": ["packages/platform/src/styles.scss"],
2020
"scripts": [],
21-
"webpackConfig": "@nrwl/react/plugins/webpack"
21+
"webpackConfig": "packages/platform/webpack"
2222
},
2323
"configurations": {
2424
"production": {

packages/platform/src/app/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { DRoot } from '@react-devui/ui';
1111

1212
import { LOGIN_PATH } from '../config/other';
1313
import { STORAGE_KEY } from '../config/storage';
14+
import { useHttp, useInit } from '../core';
1415
import { AppRoutes } from './Routes';
15-
import { useHttp, useInit } from './hooks';
1616

1717
export type AppTheme = 'light' | 'dark';
1818

@@ -73,7 +73,7 @@ export function App() {
7373
const rootContext = useMemo<DConfigContextData>(
7474
() => ({
7575
i18n: { lang: language },
76-
layout: { scrollEl: 'main.app-main', resizeEl: 'article.app-md-route' },
76+
layout: { scrollEl: 'main', resizeEl: '.app-md-route' },
7777
}),
7878
[language]
7979
);

packages/platform/src/app/Routes.guard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Navigate, useLocation } from 'react-router-dom';
55

66
import { LOGIN_PATH, PREV_ROUTE_KEY } from '../config/other';
77
import { TOKEN, TOKEN_EXPIRATION_OFFSET } from '../config/token';
8-
import { useACL } from './hooks';
8+
import { useACL } from '../core';
99

1010
export function useACLGuard(): CanActivateFn {
1111
const acl = useACL();

0 commit comments

Comments
 (0)