Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions designer-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "cross-env vite",
"dev:withAuth": "cross-env VITE_AUTH=true vite",
"build:alpha": "cross-env NODE_OPTIONS=--max-old-space-size=10240 vite build --mode alpha",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=10240 vite build",
"test": "vitest run",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "pnpm run setup && concurrently 'pnpm:serve:backend' 'pnpm:serve:frontend'",
"dev:withAuth": "pnpm run setup && pnpm --filter designer-demo dev:withAuth",
"serve:frontend": "pnpm --filter designer-demo dev",
"serve:backend": "pnpm --filter @opentiny/tiny-engine-mock dev",
"build:plugin": "pnpm --filter @opentiny/tiny-engine-* --filter @opentiny/tiny-engine build",
Expand Down
4 changes: 3 additions & 1 deletion packages/design-core/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ import {
} from './re-export'

const isDevelopEnv = import.meta.env.MODE?.includes('dev')
const useAuth = import.meta.env.VITE_AUTH === 'true'

window.__TINY_ENGINE_REMOVED_REGISTRY = {}

export default {
Expand Down Expand Up @@ -136,7 +138,7 @@ export default {
}
],
enableTailwindCSS: true,
enableLogin: isDevelopEnv ? false : true
enableLogin: useAuth || !isDevelopEnv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

designer-demo 工程中配置注册表覆盖是不是更合理一点?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是默认值,designer demo注册表里面可以覆盖这个默认值

},
layout: __TINY_ENGINE_REMOVED_REGISTRY['engine.layout'] === false ? null : Layout,
toolbars: [
Expand Down