Skip to content

Commit

Permalink
feat(platform): add test route
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Sep 21, 2022
1 parent ba8e5c3 commit ad7260c
Show file tree
Hide file tree
Showing 103 changed files with 3,186 additions and 1,438 deletions.
9 changes: 8 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
"rules": {
"custom-property-pattern": null,
"no-invalid-position-at-import-rule": null,
"selector-class-pattern": null
"selector-class-pattern": null,
"block-no-empty": null,
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": ["global"]
}
]
},
"overrides": [
{
Expand Down
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,40 @@
"@ant-design/icons-svg": "^4.2.1",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@nrwl/cli": "14.6.5",
"@nrwl/eslint-plugin-nx": "14.6.5",
"@nrwl/jest": "14.6.5",
"@nrwl/linter": "14.6.5",
"@nrwl/cli": "14.7.6",
"@nrwl/eslint-plugin-nx": "14.7.6",
"@nrwl/jest": "14.7.6",
"@nrwl/linter": "14.7.6",
"@nrwl/nx-cloud": "14.6.2",
"@nrwl/react": "14.6.5",
"@nrwl/tao": "14.6.5",
"@nrwl/web": "14.6.5",
"@nrwl/workspace": "14.6.5",
"@nrwl/react": "14.7.6",
"@nrwl/tao": "14.7.6",
"@nrwl/web": "14.7.6",
"@nrwl/workspace": "14.7.6",
"@stackblitz/sdk": "^1.8.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/fs-extra": "^9.0.13",
"@types/glob": "^8.0.0",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.182",
"@types/lodash": "^4.14.185",
"@types/marked": "^4.0.7",
"@types/mocha": "^9.1.1",
"@types/node": "^18.7.16",
"@types/react": "^18.0.18",
"@types/node": "^18.7.18",
"@types/react": "^18.0.20",
"@types/react-dom": "^18.0.6",
"@types/vscode": "^1.71.0",
"@types/yaml-front-matter": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"@vscode/test-electron": "^2.1.5",
"axios": "^0.27.2",
"axios-mock-adapter": "^1.21.2",
"babel-jest": "^27.5.1",
"codesandbox": "^2.2.3",
"colors": "^1.4.0",
"core-js": "^3.25.1",
"core-js": "^3.25.2",
"dayjs": "^1.11.5",
"eslint": "^8.23.0",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.3.6",
Expand All @@ -68,41 +68,41 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tsdoc": "^0.2.16",
"eslint-plugin-tsdoc": "^0.2.17",
"fs-extra": "^10.1.0",
"glob": "^8.0.3",
"highlight.js": "^11.6.0",
"husky": "^8.0.1",
"i18next": "^21.9.0",
"i18next": "^21.9.2",
"immer": "^9.0.15",
"is-builtin-module": "^3.2.0",
"jest": "^27.5.1",
"lerna": "^5.5.0",
"lerna": "^5.5.1",
"lodash": "^4.17.21",
"marked": "^4.1.0",
"mocha": "^10.0.0",
"nx": "14.6.5",
"nx": "14.7.6",
"postcss-html": "^1.5.0",
"postcss-markdown": "^1.2.0",
"prettier": "^2.7.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^11.18.5",
"react-router-dom": "^6.3.0",
"react-i18next": "^11.18.6",
"react-router-dom": "^6.4.0",
"react-test-renderer": "^18.2.0",
"regenerator-runtime": "^0.13.9",
"rfs": "^9.0.6",
"rxjs": "^7.5.6",
"rxjs-for-await": "^1.0.0",
"sass": "^1.54.9",
"sort-package-json": "^1.57.0",
"stylelint": "^14.10.0",
"stylelint": "^14.12.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recess-order": "^3.0.0",
"stylelint-config-recommended-scss": "^7.0.0",
"stylelint-config-standard": "^28.0.0",
"stylelint-scss": "^4.3.0",
"swiper": "^8.3.2",
"swiper": "^8.4.2",
"table": "^6.8.0",
"ts-jest": "^27.1.4",
"ts-node": "^10.9.1",
Expand Down
1 change: 1 addition & 0 deletions packages/hooks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"options": {
"outputPath": "dist/packages/hooks",
"tsConfig": "packages/hooks/tsconfig.lib.json",
"rootDir": "packages/hooks/src",
"main": "packages/hooks/src/index.ts",
"updateBuildableProjectDepsInPackageJson": false,
"assets": [
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"**/*.spec.jsx",
"**/*.test.jsx"
],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
}
1 change: 1 addition & 0 deletions packages/icons/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"options": {
"outputPath": "dist/packages/icons",
"tsConfig": "packages/icons/tsconfig.lib.json",
"rootDir": "packages/icons/src",
"main": "packages/icons/src/index.ts",
"updateBuildableProjectDepsInPackageJson": false,
"assets": [
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"**/*.spec.jsx",
"**/*.test.jsx"
],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
}
5 changes: 3 additions & 2 deletions packages/platform/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "platform",
"name": "rd-platform",
"version": "0.0.1",
"private": true,
"description": "An out-of-box solution for enterprise applications as a React boilerplate",
"keywords": [
"react",
"devui",
"admin",
"platform"
"platform",
"rd-platform"
],
"homepage": "https://github.com/DevCloudFE/react-devui/tree/main/packages/platform#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"assets": ["packages/platform/src/assets"],
"styles": ["packages/platform/src/styles.scss"],
"scripts": [],
"webpackConfig": "@nrwl/react/plugins/webpack"
"webpackConfig": "packages/platform/webpack"
},
"configurations": {
"production": {
Expand Down
4 changes: 2 additions & 2 deletions packages/platform/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { DRoot } from '@react-devui/ui';

import { LOGIN_PATH } from '../config/other';
import { STORAGE_KEY } from '../config/storage';
import { useHttp, useInit } from '../core';
import { AppRoutes } from './Routes';
import { useHttp, useInit } from './hooks';

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

Expand Down Expand Up @@ -73,7 +73,7 @@ export function App() {
const rootContext = useMemo<DConfigContextData>(
() => ({
i18n: { lang: language },
layout: { scrollEl: 'main.app-main', resizeEl: 'article.app-md-route' },
layout: { scrollEl: 'main', resizeEl: '.app-md-route' },
}),
[language]
);
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/src/app/Routes.guard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Navigate, useLocation } from 'react-router-dom';

import { LOGIN_PATH, PREV_ROUTE_KEY } from '../config/other';
import { TOKEN, TOKEN_EXPIRATION_OFFSET } from '../config/token';
import { useACL } from './hooks';
import { useACL } from '../core';

export function useACLGuard(): CanActivateFn {
const acl = useACL();
Expand Down

0 comments on commit ad7260c

Please sign in to comment.