File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 "type" : " module" ,
66 "scripts" : {
77 "dev" : " cross-env vite" ,
8+ "dev:withAuth" : " cross-env VITE_AUTH=true vite" ,
89 "build:alpha" : " cross-env NODE_OPTIONS=--max-old-space-size=10240 vite build --mode alpha" ,
910 "build" : " cross-env NODE_OPTIONS=--max-old-space-size=10240 vite build" ,
1011 "test" : " vitest run" ,
Original file line number Diff line number Diff line change 44 "scripts" : {
55 "preinstall" : " npx only-allow pnpm" ,
66 "dev" : " pnpm run setup && concurrently 'pnpm:serve:backend' 'pnpm:serve:frontend'" ,
7+ "dev:withAuth" : " pnpm run setup && pnpm --filter designer-demo dev:withAuth" ,
78 "serve:frontend" : " pnpm --filter designer-demo dev" ,
89 "serve:backend" : " pnpm --filter @opentiny/tiny-engine-mock dev" ,
910 "build:plugin" : " pnpm --filter @opentiny/tiny-engine-* --filter @opentiny/tiny-engine build" ,
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ import {
5858} from './re-export'
5959
6060const isDevelopEnv = import . meta. env . MODE ?. includes ( 'dev' )
61+ const useAuth = import . meta. env . VITE_AUTH === 'true'
62+
6163window . __TINY_ENGINE_REMOVED_REGISTRY = { }
6264
6365export default {
@@ -136,7 +138,7 @@ export default {
136138 }
137139 ] ,
138140 enableTailwindCSS : true ,
139- enableLogin : isDevelopEnv ? false : true
141+ enableLogin : useAuth || ! isDevelopEnv
140142 } ,
141143 layout : __TINY_ENGINE_REMOVED_REGISTRY [ 'engine.layout' ] === false ? null : Layout ,
142144 toolbars : [
You can’t perform that action at this time.
0 commit comments