@das-fed/cli 6.4.0-dev.3 → 6.4.0-dev.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -4
- package/src/commands/build/extra/auth/index.js +1 -0
- package/src/commands/build/extra/i18n/index.js +2 -0
- package/src/commands/build/extra/i18n/vite.config.ts +1 -0
- package/src/commands/build/extra/index.js +1 -0
- package/src/commands/build/extra/theme/index.js +1 -0
- package/src/commands/build/index.js +1 -1
- package/src/commands/build/nginx.main.conf +54 -54
- package/src/commands/build/nginx.micro.conf +61 -61
- package/src/commands/init/template/.prettierignore +21 -21
- package/src/commands/init/template/.prettierrc +8 -8
- package/src/commands/init/template/README.md +19 -19
- package/src/commands/init/template/config.js +3 -3
- package/src/commands/init/template/index.html +12 -12
- package/src/commands/init/template/package.json +12 -12
- package/src/commands/init/template/public/config.js +1 -1
- package/src/commands/init/template/src/main.ts +9 -9
- package/src/commands/init/template/src/micro-app.ts +8 -8
- package/src/commands/init/template/src/views/demo/app.vue +61 -61
- package/src/commands/init/template/src/views/demo/i18n/index.ts +14 -14
- package/src/commands/init/template/src/views/demo/router.ts +13 -13
- package/src/commands/init/template/src/views/demo/theme/index.ts +7 -7
- package/src/commands/init/template/src/views/hello/api/index.ts +6 -6
- package/src/commands/init/template/src/views/hello/app.vue +157 -157
- package/src/commands/init/template/src/views/hello/i18n/index.ts +16 -16
- package/src/commands/init/template/src/views/hello/router.ts +12 -12
- package/src/commands/init/template/src/views/hello/theme/index.ts +18 -18
- package/src/commands/init/template/src/vite-env.d.ts +1 -1
- package/src/commands/init/template/tsconfig.app.json +28 -28
- package/src/commands/init/template/tsconfig.json +11 -11
- package/src/commands/init/template/tsconfig.node.json +13 -13
- package/src/commands/init/template/vite.config.ts +14 -14
- package/src/vite-plugins/das-fe/index.js +1 -1
- package/src/vite-plugins/das-fe-resolve/index.js +1 -0
- package/src/vite-plugins/das-fe-ui/index.js +1 -1
- package/src/vite-plugins/das-fe-web/index.js +1 -1
- package/src/vite-plugins/das-fe-web-app/index.js +1 -1
- package/src/vite-plugins/dynamic-entry/index.js +1 -0
- package/src/vite-plugins/index.js +1 -1
- package/src/commands/build/get-window-config.js +0 -1
- package/src/commands/helper/modules/gen-auth/gen/dist/config.js +0 -1
- package/src/commands/helper/modules/gen-auth/gen/dist/config.local.js +0 -1
- package/src/commands/helper/modules/gen-auth/gen/dist/index.js +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@das-fed/cli",
|
3
|
-
"version": "6.4.0-dev.
|
3
|
+
"version": "6.4.0-dev.31",
|
4
4
|
"description": "",
|
5
5
|
"type": "module",
|
6
6
|
"main": "src/index.js",
|
@@ -30,9 +30,7 @@
|
|
30
30
|
"ora": "^8.0.1",
|
31
31
|
"prettier": "^3.2.5",
|
32
32
|
"strip-comments": "^2.0.1",
|
33
|
-
"ts-morph": "^21.0.1"
|
34
|
-
},
|
35
|
-
"devDependencies": {
|
33
|
+
"ts-morph": "^21.0.1",
|
36
34
|
"@vitejs/plugin-vue": "^5.1.1",
|
37
35
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
38
36
|
"diff": "^5.2.0",
|
@@ -47,6 +45,7 @@
|
|
47
45
|
"vite-plugin-style-import": "^2.0.0"
|
48
46
|
},
|
49
47
|
"peerDependencies": {
|
48
|
+
"@vitejs/plugin-vue": ">=5.1.1",
|
50
49
|
"@vitejs/plugin-vue-jsx": ">=3.1.0",
|
51
50
|
"rollup-plugin-visualizer": ">=5.12.0",
|
52
51
|
"unplugin-auto-import": ">=0.17.6",
|
@@ -0,0 +1 @@
|
|
1
|
+
let extraAuth=async()=>{};export{extraAuth};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{resolve,relative,dirname}from"path";import{fileURLToPath}from"url";import fs from"fs-extra";import{build}from"vite";import prettier from"prettier";import glob from"fast-glob";let __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),extractWrappedChinese=e=>{var s,e=(s=e.replace(/<!--[\s\S]*?-->/g,"").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/^\s*console\..*$/gm,"")).replace(/(\bi18n\b|\bt\b)\s*\(([^)]*)$/gm,(e,r,t,i)=>{var a=s.indexOf(")",i);return-1!==a?e+s.slice(i+e.length,a+1).replace(/\n\s*/g,""):e});let a=/[\u4e00-\u9fa5]+/g,l=/(?:i18n|t)\s*\(\s*(['"`])/,o=[];return e.split("\n").forEach(e=>{for(;null!==(t=a.exec(e));){var[r]=t,t=t.index,i=t+r.length,t=e.slice(0,t).trim(),i=e.slice(i).trim();l.test(t)&&i.includes(")")&&o.push(r)}}),o},extraI18n=async e=>{var{cwd:r=process.cwd()}=e||{},e=resolve(r,"i18n-colletion.local.ts"),t=(await fs.exists(e)||(await fs.ensureFile(e),await fs.writeFile(e,"export default import.meta.glob(['./src/**/**/i18n/*.ts','!./src/**/**/i18n/useI18n.ts'], { eager: true, import: 'default' })")),resolve(__dirname,"./.temp"));await fs.ensureDir(t);let i=`index.${(new Date).getTime()}.cjs`;await build({configFile:resolve(__dirname,"./vite.config.ts"),build:{emptyOutDir:!0,outDir:t,lib:{entry:e,fileName:()=>i,formats:["cjs"]}}});var a,s,l=(await import("./.temp/"+i)).default;let o={};for(a in l)Object.assign(o,l[a]);for(s of await glob(["src/**/**/*.vue","src/**/**/*.ts","!src/**/**/i18n/*.ts"],{cwd:r,onlyFiles:!0})){var n=resolve(r,s),n=(await fs.readFile(n)).toString(),n=extractWrappedChinese(n);0<n.length&&n.map(e=>o[e]="")}var f=resolve(r,"public/i18n-collection");await fs.ensureDir(f),await fs.emptyDir(f);for(let a of["zh-CN","en"]){let i="export default {";Object.keys(o).map(e=>{var r=o[e];let t=r[a]||"";"zh-CN"===a&&(t=r[a]||r["zh-cn"]||r),i+=`'${e}': "${t}",\r
|
2
|
+
`}),i+="}";var m=resolve(f,a+".js");await fs.ensureFile(m),await fs.writeFile(m,await prettier.format(i,{parser:"typescript"}))}};export{extraI18n};
|
@@ -0,0 +1 @@
|
|
1
|
+
export default {}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{extraI18n}from"./i18n/index.js";import{extraTheme}from"./theme/index.js";import{extraAuth}from"./auth/index.js";let extra=async e=>{await Promise.all([extraI18n(e),extraTheme(e),extraAuth(e)])};export{extra};
|
@@ -0,0 +1 @@
|
|
1
|
+
let extraTheme=async()=>{};export{extraTheme};
|
@@ -1 +1 @@
|
|
1
|
-
import{initPublicConfig}from"../dev-helper/init-public-config.js";import{initWatchers}from"../dev-helper/watchers/index.js";import{execSync}from"child_process";import{resolve,relative,dirname}from"path";import{fileURLToPath}from"url";import minimist from"minimist";import fs from"fs-extra";import{
|
1
|
+
import{initPublicConfig}from"../dev-helper/init-public-config.js";import{initWatchers}from"../dev-helper/watchers/index.js";import{execSync}from"child_process";import{resolve,relative,dirname}from"path";import{fileURLToPath}from"url";import minimist from"minimist";import fs from"fs-extra";import{extra}from"./extra/index.js";import{getWindowConfig}from"../../utils/get-window-config/index.js";import{getCliConfig}from"../../utils/get-cli-config/index.js";let __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export default{handle:async i=>{var[,...e]=i,i=minimist(i),t=process.cwd(),o={cwd:t,isDev:!1,isBuild:!0,...await getCliConfig(),...i};if(!(o.isLib??!1)){await initPublicConfig(o),await initWatchers(o);let i=await getWindowConfig(resolve(t,"public/config.js"));try{var r,a=resolve(t,"config.js");await fs.exists(a)&&(r=(await import(relative(resolve(__dirname),a))).default,""===i.microAppName&&delete i.microAppName,i={...r,...i})}catch(i){console.log("get rootConfig error",i)}try{await extra()}catch(i){console.log("提取i18n、theme、auth数据时发生错误",i)}}(e||[]).join(" ");let n="";i.c&&(n+="-c "+i.c),execSync("npx vite build "+n,{cwd:t,stdio:"inherit"})}};
|
@@ -1,55 +1,55 @@
|
|
1
|
-
worker_processes 8;
|
2
|
-
worker_rlimit_nofile 6000;
|
3
|
-
events {
|
4
|
-
worker_connections 1000;
|
5
|
-
}
|
6
|
-
http {
|
7
|
-
include mime.types;
|
8
|
-
default_type application/octet-stream;
|
9
|
-
|
10
|
-
# 使用gzip压缩
|
11
|
-
gzip on;
|
12
|
-
gzip_proxied any;
|
13
|
-
gzip_http_version 1.0;
|
14
|
-
gzip_min_length 1100;
|
15
|
-
gzip_buffers 4 16k;
|
16
|
-
gzip_comp_level 1;
|
17
|
-
gzip_vary on;
|
18
|
-
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/json application/javascript image/x-icon;
|
19
|
-
gzip_disable "MSIE [1-6]\.";
|
20
|
-
|
21
|
-
# proxy配置
|
22
|
-
proxy_http_version 1.1;
|
23
|
-
proxy_connect_timeout 86400s;
|
24
|
-
proxy_read_timeout 86400s;
|
25
|
-
proxy_send_timeout 86400s;
|
26
|
-
proxy_set_header Upgrade $http_upgrade;
|
27
|
-
proxy_set_header Connection "upgrade";
|
28
|
-
proxy_set_header Host $host;
|
29
|
-
proxy_set_header X-Real-IP $remote_addr;
|
30
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
31
|
-
proxy_set_header X-Forwarded-Proto $scheme;
|
32
|
-
proxy_set_header X-Frame-Options SAMEORIGIN;
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
sendfile on;
|
37
|
-
keepalive_timeout 65;
|
38
|
-
client_max_body_size 500m;
|
39
|
-
server_tokens off;
|
40
|
-
server {
|
41
|
-
listen 80;
|
42
|
-
etag on;
|
43
|
-
location / {
|
44
|
-
root /usr/share/nginx/html;
|
45
|
-
index index.html index.htm;
|
46
|
-
try_files $uri $uri/ /index.html;
|
47
|
-
expires 0;
|
48
|
-
}
|
49
|
-
|
50
|
-
error_page 500 502 503 504 /50x.html;
|
51
|
-
location = /50x.html {
|
52
|
-
root html;
|
53
|
-
}
|
54
|
-
}
|
1
|
+
worker_processes 8;
|
2
|
+
worker_rlimit_nofile 6000;
|
3
|
+
events {
|
4
|
+
worker_connections 1000;
|
5
|
+
}
|
6
|
+
http {
|
7
|
+
include mime.types;
|
8
|
+
default_type application/octet-stream;
|
9
|
+
|
10
|
+
# 使用gzip压缩
|
11
|
+
gzip on;
|
12
|
+
gzip_proxied any;
|
13
|
+
gzip_http_version 1.0;
|
14
|
+
gzip_min_length 1100;
|
15
|
+
gzip_buffers 4 16k;
|
16
|
+
gzip_comp_level 1;
|
17
|
+
gzip_vary on;
|
18
|
+
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/json application/javascript image/x-icon;
|
19
|
+
gzip_disable "MSIE [1-6]\.";
|
20
|
+
|
21
|
+
# proxy配置
|
22
|
+
proxy_http_version 1.1;
|
23
|
+
proxy_connect_timeout 86400s;
|
24
|
+
proxy_read_timeout 86400s;
|
25
|
+
proxy_send_timeout 86400s;
|
26
|
+
proxy_set_header Upgrade $http_upgrade;
|
27
|
+
proxy_set_header Connection "upgrade";
|
28
|
+
proxy_set_header Host $host;
|
29
|
+
proxy_set_header X-Real-IP $remote_addr;
|
30
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
31
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
32
|
+
proxy_set_header X-Frame-Options SAMEORIGIN;
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
sendfile on;
|
37
|
+
keepalive_timeout 65;
|
38
|
+
client_max_body_size 500m;
|
39
|
+
server_tokens off;
|
40
|
+
server {
|
41
|
+
listen 80;
|
42
|
+
etag on;
|
43
|
+
location / {
|
44
|
+
root /usr/share/nginx/html;
|
45
|
+
index index.html index.htm;
|
46
|
+
try_files $uri $uri/ /index.html;
|
47
|
+
expires 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
error_page 500 502 503 504 /50x.html;
|
51
|
+
location = /50x.html {
|
52
|
+
root html;
|
53
|
+
}
|
54
|
+
}
|
55
55
|
}
|
@@ -1,62 +1,62 @@
|
|
1
|
-
worker_processes 8;
|
2
|
-
worker_rlimit_nofile 2000;
|
3
|
-
events {
|
4
|
-
worker_connections 1000;
|
5
|
-
}
|
6
|
-
http {
|
7
|
-
include mime.types;
|
8
|
-
default_type application/octet-stream;
|
9
|
-
# 使用gzip压缩
|
10
|
-
gzip on;
|
11
|
-
gzip_proxied any;
|
12
|
-
gzip_http_version 1.0;
|
13
|
-
gzip_min_length 1100;
|
14
|
-
gzip_buffers 4 16k;
|
15
|
-
gzip_comp_level 1;
|
16
|
-
gzip_vary on;
|
17
|
-
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/json application/javascript image/x-icon;
|
18
|
-
gzip_disable "MSIE [1-6]\.";
|
19
|
-
|
20
|
-
# proxy配置
|
21
|
-
proxy_http_version 1.1;
|
22
|
-
proxy_connect_timeout 86400s;
|
23
|
-
proxy_read_timeout 86400s;
|
24
|
-
proxy_send_timeout 86400s;
|
25
|
-
proxy_set_header Upgrade $http_upgrade;
|
26
|
-
proxy_set_header Connection "upgrade";
|
27
|
-
proxy_set_header Host $host;
|
28
|
-
proxy_set_header X-Real-IP $remote_addr;
|
29
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
30
|
-
proxy_set_header X-Forwarded-Proto $scheme;
|
31
|
-
proxy_set_header X-Frame-Options SAMEORIGIN;
|
32
|
-
|
33
|
-
|
34
|
-
sendfile on;
|
35
|
-
keepalive_timeout 65;
|
36
|
-
client_max_body_size 500m;
|
37
|
-
server_tokens off;
|
38
|
-
server {
|
39
|
-
listen 80;
|
40
|
-
etag on;
|
41
|
-
location / {
|
42
|
-
root /usr/share/nginx/html;
|
43
|
-
try_files $uri $uri/ /index.html;
|
44
|
-
expires 0;
|
45
|
-
}
|
46
|
-
|
47
|
-
location ~ ^/(api|oss)/ {
|
48
|
-
proxy_pass http://gateway;
|
49
|
-
}
|
50
|
-
|
51
|
-
location {url} {
|
52
|
-
alias /usr/share/nginx/html;
|
53
|
-
try_files $uri $uri/ {url}/index.html;
|
54
|
-
expires 0;
|
55
|
-
}
|
56
|
-
|
57
|
-
error_page 500 502 503 504 /50x.html;
|
58
|
-
location = /50x.html {
|
59
|
-
root html;
|
60
|
-
}
|
61
|
-
}
|
1
|
+
worker_processes 8;
|
2
|
+
worker_rlimit_nofile 2000;
|
3
|
+
events {
|
4
|
+
worker_connections 1000;
|
5
|
+
}
|
6
|
+
http {
|
7
|
+
include mime.types;
|
8
|
+
default_type application/octet-stream;
|
9
|
+
# 使用gzip压缩
|
10
|
+
gzip on;
|
11
|
+
gzip_proxied any;
|
12
|
+
gzip_http_version 1.0;
|
13
|
+
gzip_min_length 1100;
|
14
|
+
gzip_buffers 4 16k;
|
15
|
+
gzip_comp_level 1;
|
16
|
+
gzip_vary on;
|
17
|
+
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/json application/javascript image/x-icon;
|
18
|
+
gzip_disable "MSIE [1-6]\.";
|
19
|
+
|
20
|
+
# proxy配置
|
21
|
+
proxy_http_version 1.1;
|
22
|
+
proxy_connect_timeout 86400s;
|
23
|
+
proxy_read_timeout 86400s;
|
24
|
+
proxy_send_timeout 86400s;
|
25
|
+
proxy_set_header Upgrade $http_upgrade;
|
26
|
+
proxy_set_header Connection "upgrade";
|
27
|
+
proxy_set_header Host $host;
|
28
|
+
proxy_set_header X-Real-IP $remote_addr;
|
29
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
30
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
31
|
+
proxy_set_header X-Frame-Options SAMEORIGIN;
|
32
|
+
|
33
|
+
|
34
|
+
sendfile on;
|
35
|
+
keepalive_timeout 65;
|
36
|
+
client_max_body_size 500m;
|
37
|
+
server_tokens off;
|
38
|
+
server {
|
39
|
+
listen 80;
|
40
|
+
etag on;
|
41
|
+
location / {
|
42
|
+
root /usr/share/nginx/html;
|
43
|
+
try_files $uri $uri/ /index.html;
|
44
|
+
expires 0;
|
45
|
+
}
|
46
|
+
|
47
|
+
location ~ ^/(api|oss)/ {
|
48
|
+
proxy_pass http://gateway;
|
49
|
+
}
|
50
|
+
|
51
|
+
location {url} {
|
52
|
+
alias /usr/share/nginx/html;
|
53
|
+
try_files $uri $uri/ {url}/index.html;
|
54
|
+
expires 0;
|
55
|
+
}
|
56
|
+
|
57
|
+
error_page 500 502 503 504 /50x.html;
|
58
|
+
location = /50x.html {
|
59
|
+
root html;
|
60
|
+
}
|
61
|
+
}
|
62
62
|
}
|
@@ -1,21 +1,21 @@
|
|
1
|
-
## OS
|
2
|
-
.DS_Store
|
3
|
-
.idea
|
4
|
-
.editorconfig
|
5
|
-
pnpm-lock.yaml
|
6
|
-
.npmrc
|
7
|
-
|
8
|
-
# Ignored suffix
|
9
|
-
*.log
|
10
|
-
*.md
|
11
|
-
*.svg
|
12
|
-
*.png
|
13
|
-
*.ico
|
14
|
-
*ignore
|
15
|
-
|
16
|
-
## Local
|
17
|
-
.husky
|
18
|
-
|
19
|
-
## Built-files
|
20
|
-
.cache
|
21
|
-
dist
|
1
|
+
## OS
|
2
|
+
.DS_Store
|
3
|
+
.idea
|
4
|
+
.editorconfig
|
5
|
+
pnpm-lock.yaml
|
6
|
+
.npmrc
|
7
|
+
|
8
|
+
# Ignored suffix
|
9
|
+
*.log
|
10
|
+
*.md
|
11
|
+
*.svg
|
12
|
+
*.png
|
13
|
+
*.ico
|
14
|
+
*ignore
|
15
|
+
|
16
|
+
## Local
|
17
|
+
.husky
|
18
|
+
|
19
|
+
## Built-files
|
20
|
+
.cache
|
21
|
+
dist
|
@@ -1,8 +1,8 @@
|
|
1
|
-
{
|
2
|
-
"singleQuote": true,
|
3
|
-
"tabWidth": 2,
|
4
|
-
"printWidth": 120,
|
5
|
-
"semi": false,
|
6
|
-
"trailingComma": "all",
|
7
|
-
"bracketSpacing": true
|
8
|
-
}
|
1
|
+
{
|
2
|
+
"singleQuote": true,
|
3
|
+
"tabWidth": 2,
|
4
|
+
"printWidth": 120,
|
5
|
+
"semi": false,
|
6
|
+
"trailingComma": "all",
|
7
|
+
"bracketSpacing": true
|
8
|
+
}
|
@@ -1,19 +1,19 @@
|
|
1
|
-
# pnpm-workspace app for @das-fed
|
2
|
-
|
3
|
-
## install
|
4
|
-
|
5
|
-
```
|
6
|
-
pnpm i
|
7
|
-
```
|
8
|
-
|
9
|
-
## dev
|
10
|
-
|
11
|
-
```
|
12
|
-
pnpm run dev
|
13
|
-
```
|
14
|
-
|
15
|
-
## build
|
16
|
-
|
17
|
-
```
|
18
|
-
pnpm run build
|
19
|
-
```
|
1
|
+
# pnpm-workspace app for @das-fed
|
2
|
+
|
3
|
+
## install
|
4
|
+
|
5
|
+
```
|
6
|
+
pnpm i
|
7
|
+
```
|
8
|
+
|
9
|
+
## dev
|
10
|
+
|
11
|
+
```
|
12
|
+
pnpm run dev
|
13
|
+
```
|
14
|
+
|
15
|
+
## build
|
16
|
+
|
17
|
+
```
|
18
|
+
pnpm run build
|
19
|
+
```
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export default {
|
2
|
-
microAppName: '%microAppName%',
|
3
|
-
}
|
1
|
+
export default {
|
2
|
+
microAppName: '%microAppName%',
|
3
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="zh-CN">
|
3
|
-
<head>
|
4
|
-
<meta charset="UTF-8" />
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
-
<title></title>
|
7
|
-
</head>
|
8
|
-
<body>
|
9
|
-
<div id="app"></div>
|
10
|
-
<script type="module" src="/src/main.ts"></script>
|
11
|
-
</body>
|
12
|
-
</html>
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="zh-CN">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
+
<title></title>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div id="app"></div>
|
10
|
+
<script type="module" src="/src/main.ts"></script>
|
11
|
+
</body>
|
12
|
+
</html>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
{
|
2
|
-
"name": "@das-fed-apps/%packageName%",
|
3
|
-
"description": "pnpm-workspace app for @das-fed",
|
4
|
-
"private": true,
|
5
|
-
"version": "0.0.0",
|
6
|
-
"type": "module",
|
7
|
-
"scripts": {
|
8
|
-
"dev": "das-cli dev",
|
9
|
-
"build": "das-cli build",
|
10
|
-
"preview": "vite preview"
|
11
|
-
}
|
12
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@das-fed-apps/%packageName%",
|
3
|
+
"description": "pnpm-workspace app for @das-fed",
|
4
|
+
"private": true,
|
5
|
+
"version": "0.0.0",
|
6
|
+
"type": "module",
|
7
|
+
"scripts": {
|
8
|
+
"dev": "das-cli dev",
|
9
|
+
"build": "das-cli build",
|
10
|
+
"preview": "vite preview"
|
11
|
+
}
|
12
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
window.config = {}
|
1
|
+
window.config = {}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { createDasWebApp } from '@das-fed/web'
|
2
|
-
import '@das-fed/web/packages/style'
|
3
|
-
|
4
|
-
createDasWebApp({
|
5
|
-
// @ts-ignore
|
6
|
-
microAppName: __MICRO_APPNAME__,
|
7
|
-
router: { glob: import.meta.glob('@/views/**/router.ts', { eager: true, import: 'default' }) },
|
8
|
-
plugins: { glob: import.meta.glob('@/plugins/*/index.ts', { eager: true, import: 'default' }) },
|
9
|
-
})
|
1
|
+
import { createDasWebApp } from '@das-fed/web'
|
2
|
+
import '@das-fed/web/packages/style'
|
3
|
+
|
4
|
+
createDasWebApp({
|
5
|
+
// @ts-ignore
|
6
|
+
microAppName: __MICRO_APPNAME__,
|
7
|
+
router: { glob: import.meta.glob('@/views/**/router.ts', { eager: true, import: 'default' }) },
|
8
|
+
plugins: { glob: import.meta.glob('@/plugins/*/index.ts', { eager: true, import: 'default' }) },
|
9
|
+
})
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { createDasWebApp } from '@das-fed/web'
|
2
|
-
|
3
|
-
createDasWebApp({
|
4
|
-
// @ts-ignore
|
5
|
-
microAppName: __MICRO_APPNAME__,
|
6
|
-
router: { glob: import.meta.glob('@/views/**/router.ts', { eager: true, import: 'default' }) },
|
7
|
-
plugins: { glob: import.meta.glob('@/plugins/*/index.ts', { eager: true, import: 'default' }) },
|
8
|
-
})
|
1
|
+
import { createDasWebApp } from '@das-fed/web'
|
2
|
+
|
3
|
+
createDasWebApp({
|
4
|
+
// @ts-ignore
|
5
|
+
microAppName: __MICRO_APPNAME__,
|
6
|
+
router: { glob: import.meta.glob('@/views/**/router.ts', { eager: true, import: 'default' }) },
|
7
|
+
plugins: { glob: import.meta.glob('@/plugins/*/index.ts', { eager: true, import: 'default' }) },
|
8
|
+
})
|
@@ -1,61 +1,61 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="demo-container">
|
3
|
-
<h2>
|
4
|
-
{{ t('demo-msg') }}
|
5
|
-
</h2>
|
6
|
-
|
7
|
-
<a href="http://aiot-ui.rd.chn-das.com/das-ui" target="_blank">
|
8
|
-
<p class="read-the-docs">{{ t('demo-doc-tip') }}</p>
|
9
|
-
</a>
|
10
|
-
|
11
|
-
<div>{{ t('demo-component-msg') }}</div>
|
12
|
-
<div class="alert-container">
|
13
|
-
<div v-for="item in ['info', 'success', 'warning', 'error']" :key="item" class="alert-item">
|
14
|
-
<DasAlert show-icon :message="`${item} Text`" :type="item" />
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<div>@das-fed/ui组件库中DasIcon使用案例</div>
|
19
|
-
<DasIconAdd />
|
20
|
-
</div>
|
21
|
-
</template>
|
22
|
-
|
23
|
-
<script setup lang="ts">
|
24
|
-
import { t } from '@das-fed/web'
|
25
|
-
import { DasAlert, DasIconAdd } from '@das-fed/ui'
|
26
|
-
</script>
|
27
|
-
|
28
|
-
<style>
|
29
|
-
.demo-container {
|
30
|
-
margin: 0 auto;
|
31
|
-
padding: 2rem;
|
32
|
-
text-align: center;
|
33
|
-
height: 100%;
|
34
|
-
background: var(--hello-bg);
|
35
|
-
color: var(--hello-color);
|
36
|
-
}
|
37
|
-
.demo-container h2 {
|
38
|
-
color: var(--hello-color);
|
39
|
-
}
|
40
|
-
.alert-container {
|
41
|
-
background: var(--demo-alert-bg);
|
42
|
-
color: var(--demo-alert-color);
|
43
|
-
padding: 20px;
|
44
|
-
margin: 10px 0;
|
45
|
-
border-radius: 10px;
|
46
|
-
box-sizing: border-box;
|
47
|
-
height: auto;
|
48
|
-
min-width: 600px;
|
49
|
-
}
|
50
|
-
.alert-item {
|
51
|
-
margin-top: 20px;
|
52
|
-
}
|
53
|
-
.alert-item:first-child {
|
54
|
-
margin-top: 0;
|
55
|
-
}
|
56
|
-
.read-the-docs {
|
57
|
-
cursor: pointer;
|
58
|
-
font-size: 14px;
|
59
|
-
font-weight: 400;
|
60
|
-
}
|
61
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="demo-container">
|
3
|
+
<h2>
|
4
|
+
{{ t('demo-msg') }}
|
5
|
+
</h2>
|
6
|
+
|
7
|
+
<a href="http://aiot-ui.rd.chn-das.com/das-ui" target="_blank">
|
8
|
+
<p class="read-the-docs">{{ t('demo-doc-tip') }}</p>
|
9
|
+
</a>
|
10
|
+
|
11
|
+
<div>{{ t('demo-component-msg') }}</div>
|
12
|
+
<div class="alert-container">
|
13
|
+
<div v-for="item in ['info', 'success', 'warning', 'error']" :key="item" class="alert-item">
|
14
|
+
<DasAlert show-icon :message="`${item} Text`" :type="item" />
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div>@das-fed/ui组件库中DasIcon使用案例</div>
|
19
|
+
<DasIconAdd />
|
20
|
+
</div>
|
21
|
+
</template>
|
22
|
+
|
23
|
+
<script setup lang="ts">
|
24
|
+
import { t } from '@das-fed/web'
|
25
|
+
import { DasAlert, DasIconAdd } from '@das-fed/ui'
|
26
|
+
</script>
|
27
|
+
|
28
|
+
<style>
|
29
|
+
.demo-container {
|
30
|
+
margin: 0 auto;
|
31
|
+
padding: 2rem;
|
32
|
+
text-align: center;
|
33
|
+
height: 100%;
|
34
|
+
background: var(--hello-bg);
|
35
|
+
color: var(--hello-color);
|
36
|
+
}
|
37
|
+
.demo-container h2 {
|
38
|
+
color: var(--hello-color);
|
39
|
+
}
|
40
|
+
.alert-container {
|
41
|
+
background: var(--demo-alert-bg);
|
42
|
+
color: var(--demo-alert-color);
|
43
|
+
padding: 20px;
|
44
|
+
margin: 10px 0;
|
45
|
+
border-radius: 10px;
|
46
|
+
box-sizing: border-box;
|
47
|
+
height: auto;
|
48
|
+
min-width: 600px;
|
49
|
+
}
|
50
|
+
.alert-item {
|
51
|
+
margin-top: 20px;
|
52
|
+
}
|
53
|
+
.alert-item:first-child {
|
54
|
+
margin-top: 0;
|
55
|
+
}
|
56
|
+
.read-the-docs {
|
57
|
+
cursor: pointer;
|
58
|
+
font-size: 14px;
|
59
|
+
font-weight: 400;
|
60
|
+
}
|
61
|
+
</style>
|
@@ -1,14 +1,14 @@
|
|
1
|
-
export default {
|
2
|
-
'demo-msg': {
|
3
|
-
'zh-CN': '这是第一个示例路由页面',
|
4
|
-
en: 'This is Demo Page',
|
5
|
-
},
|
6
|
-
'demo-doc-tip': {
|
7
|
-
'zh-CN': '查看完整组件库文档',
|
8
|
-
en: 'read the components doc',
|
9
|
-
},
|
10
|
-
'demo-component-msg': {
|
11
|
-
'zh-CN': '@das-fed/ui组件库中DasAlert使用案例',
|
12
|
-
en: 'the DasAlert example of @das-fed/ui',
|
13
|
-
},
|
14
|
-
}
|
1
|
+
export default {
|
2
|
+
'demo-msg': {
|
3
|
+
'zh-CN': '这是第一个示例路由页面',
|
4
|
+
en: 'This is Demo Page',
|
5
|
+
},
|
6
|
+
'demo-doc-tip': {
|
7
|
+
'zh-CN': '查看完整组件库文档',
|
8
|
+
en: 'read the components doc',
|
9
|
+
},
|
10
|
+
'demo-component-msg': {
|
11
|
+
'zh-CN': '@das-fed/ui组件库中DasAlert使用案例',
|
12
|
+
en: 'the DasAlert example of @das-fed/ui',
|
13
|
+
},
|
14
|
+
}
|