@das-fed/cli 6.4.0-hot.28 → 6.4.0-hot.29
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 +1 -1
- package/src/commands/build/generate-nginx.js +1 -1
- package/src/commands/build/index.js +1 -1
- package/src/commands/build/nginx.main.conf +54 -54
- package/src/commands/build/nginx.micro.conf +56 -61
- package/src/commands/init/index.js +1 -1
- package/src/commands/init/template/.pnpmfile.cjs +29 -0
- package/src/commands/init/template/.prettierignore +21 -21
- package/src/commands/init/template/.prettierrc +8 -8
- package/src/commands/init/template/README.md +28 -28
- 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 +7 -12
- package/src/commands/init/template/packages/microapp/index.html +13 -0
- package/src/commands/init/template/packages/microapp/package.json +25 -0
- package/src/commands/init/template/packages/microapp/public/config.js +3 -0
- package/src/commands/init/template/packages/microapp/src/das-web-app.ts +11 -0
- package/src/commands/init/template/packages/microapp/src/main.dev.ts +16 -0
- package/src/commands/init/template/packages/microapp/src/main.ts +10 -0
- package/src/commands/init/template/packages/microapp/src/views/demo/api/index.ts +6 -0
- package/src/commands/init/template/packages/microapp/src/views/demo/app.vue +157 -0
- package/src/commands/init/template/packages/microapp/src/views/demo/assets/das.png +0 -0
- package/src/commands/init/template/packages/microapp/src/views/demo/assets/vite.svg +1 -0
- package/src/commands/init/template/packages/microapp/src/views/demo/assets/vue.svg +1 -0
- package/src/commands/init/template/packages/microapp/src/views/demo/i18n/index.ts +16 -0
- package/src/commands/init/template/packages/microapp/src/views/demo/router.ts +12 -0
- package/src/commands/init/template/packages/microapp/src/views/demo/theme/index.ts +18 -0
- package/src/commands/init/template/packages/microapp/tsconfig.json +32 -0
- package/src/commands/init/template/packages/microapp/tsconfig.node.json +13 -0
- package/src/commands/init/template/packages/microapp/vite.config.ts +7 -0
- package/src/commands/init/template/pnpm-workspace.yaml +6 -0
- package/src/commands/init/template/public/config.js +4 -4
- package/src/commands/init/template/scripts/build.js +34 -0
- package/src/commands/init/template/src/das-web-app.ts +9 -9
- 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 +11 -11
- package/src/utils/pure-resolve/index.js +1 -0
- 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/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 +1 @@
|
|
1
|
-
import fs from"fs-extra";import{dirname,resolve}from"path";import{fileURLToPath}from"url";let __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),generateNginx=async e=>{let{cwd:r,mainAppName:a="",microAppName:i="",microApps:
|
1
|
+
import fs from"fs-extra";import{dirname,resolve}from"path";import{fileURLToPath}from"url";let __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),generateNginx=async e=>{let{cwd:r,mainAppName:a="",microAppName:i="",microApps:o=""}=e;0<o.length&&(o=o.map(e=>({...e,name:e.name.toLocaleLowerCase()}))),a=a.toLocaleLowerCase(),i=i.toLocaleLowerCase();a;var e=!!i,n=resolve(__dirname,"./nginx.main.conf"),t=resolve(__dirname,"./nginx.micro.conf"),l=resolve(r,"public/nginx.conf"),n=(await fs.ensureFile(l),fs.readFileSync(n).toString());let m=fs.readFileSync(t).toString();e&&(m=m.replace(/\{url\}/g,("/web/"+i.split("/").pop()).replace(/\/\//g,"/"))),await fs.writeFile(l,e?m:n)};export{generateNginx};
|
@@ -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{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,n=resolve(t,"config.js");await fs.exists(n)&&(r=(await import(relative(resolve(__dirname),n))).default,""===i.microAppName&&delete i.microAppName,i={...r,...i})}catch(i){console.log("get rootConfig error",i)}}(e||[]).join(" ");let a="";i.c&&(a+="-c "+i.c),execSync("npx vite build "+a,{cwd:t,stdio:"inherit"})}};
|
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{getWindowConfig}from"../../utils/get-window-config/index.js";import{getCliConfig}from"../../utils/get-cli-config/index.js";import{generateNginx}from"./generate-nginx.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,n=resolve(t,"config.js");await fs.exists(n)&&(r=(await import(relative(resolve(__dirname),n))).default,""===i.microAppName&&delete i.microAppName,i={...r,...i}),await generateNginx({cwd:t,...i})}catch(i){console.log("get rootConfig error",i)}}(e||[]).join(" ");let a="";i.c&&(a+="-c "+i.c),execSync("npx vite build "+a,{cwd:t,stdio:"inherit"})}};
|
@@ -1,55 +1,55 @@
|
|
1
|
-
worker_processes
|
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 4;
|
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,57 @@
|
|
1
|
-
worker_processes
|
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
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
}
|
56
|
-
|
57
|
-
error_page 500 502 503 504 /50x.html;
|
58
|
-
location = /50x.html {
|
59
|
-
root html;
|
60
|
-
}
|
61
|
-
}
|
1
|
+
worker_processes 2;
|
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
|
+
|
42
|
+
location ~ ^/(api|oss)/ {
|
43
|
+
proxy_pass http://gateway:9080;
|
44
|
+
}
|
45
|
+
|
46
|
+
location {url} {
|
47
|
+
alias /usr/share/nginx/html;
|
48
|
+
try_files $uri $uri/ /index.html;
|
49
|
+
expires 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
error_page 500 502 503 504 /50x.html;
|
53
|
+
location = /50x.html {
|
54
|
+
root html;
|
55
|
+
}
|
56
|
+
}
|
62
57
|
}
|
@@ -1 +1 @@
|
|
1
|
-
import inquirer from"inquirer";import glob from"fast-glob";import{dirname,resolve}from"path";import{fileURLToPath}from"url";import fs from"fs-extra";import{consola}from"consola";import{execSync}from"child_process";import semver from"semver";let __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),getPackageJson=()=>{var e=resolve(__dirname,"../../../package.json");return fs.existsSync(e)?fs.readJSONSync(e):{}};export default{alias:["create","create-app","-c"],handle:async e=>{var
|
1
|
+
import inquirer from"inquirer";import glob from"fast-glob";import{dirname,resolve}from"path";import{fileURLToPath}from"url";import fs from"fs-extra";import{consola}from"consola";import{execSync}from"child_process";import semver from"semver";let __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),getPackageJson=()=>{var e=resolve(__dirname,"../../../package.json");return fs.existsSync(e)?fs.readJSONSync(e):{}};export default{alias:["create","create-app","-c"],handle:async e=>{var a=getPackageJson(),a=(consola.box(`Using ${a.name} v`+a.version),consola.info("create app for @das-fed"),consola.warn("必须使用 pnpm 作为依赖安装工具"),await inquirer.prompt([{name:"inputName",type:"input",message:"请输入应用名称(取git地址最后一级,要求全小写;比如:http://das-git.chn-das.com/DasAIoT/EnterpriseAdmin/PaymentCenter/front-end/payment-center.git 则为payment-center)"}])).inputName,[r]=(a||(consola.error("应用名称必填!"),process.exit()),a.split("/").slice(-1)),t="enterpriseadmin/"+r,a=(consola.success(`子应用名称为: ${t} (enterpriseadmin为默认加入的前缀)`),await inquirer.prompt([{name:"overwrite",type:"confirm",message:"初始化项目将覆盖当前目录的文件及文件夹,是否继续?"}])).overwrite;if(!a)return process.exit();var i,o=process.cwd(),s=resolve(__dirname,"./template");for(i of await glob(["**/**"],{cwd:s,dot:!0})){let e=resolve(o,i);await fs.copy(resolve(s,i),e,{overwrite:!0})}var n,p,a=resolve(o,"./packages/microapp"),c=resolve(o,"./packages/"+r),a=(await fs.ensureDir(c),await fs.copy(a,c,{overwrite:!0}),await fs.remove(a),await glob(["**/**"],{cwd:s,dot:!0}));for(n of a)(-1<n.indexOf("public/config.js")||-1<n.indexOf("src/main.dev.ts")||-1<n.indexOf("src/main.ts"))&&(p=(await fs.readFile(targetPath)).toString(),await fs.writeFile(targetPath,p.replaceAll("%microAppName%",t))),-1<n.indexOf("package.json")&&(p=(await fs.readFile(targetPath)).toString(),await fs.writeFile(targetPath,p.replaceAll("%packageName%",r)));var a=["vue","vue-router","pinia-plugin-persistedstate"],m=["@vitejs/plugin-vue","typescript","vite","vue-tsc"];let l=(await inquirer.prompt([{name:"inputName",type:"input",message:"请输入需要安装的@das-fed版本"}])).tag,d=(l||(consola.error("@das-fed版本必填!"),process.exit()),["@das-fed/web","@das-fed/ui","@das-fed/utils"]),f=["@das-fed/cli"];l&&(d=d.map(e=>e+"@"+l),f=f.map(e=>e+"@"+l)),a.push(...d),m.push(...f),execSync("pnpm add "+a.join(" "),{cwd:c,stdio:"inherit"}),execSync("pnpm add -D "+m.join(" "),{cwd:c,stdio:"inherit"}),console.log(""),consola.success("项目初始化完成!"),consola.box("run: pnpm run dev")}};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
const parseArgs = (args) => {
|
2
|
+
return args.reduce((acc, arg) => {
|
3
|
+
const [key, value] = arg.split('=')
|
4
|
+
acc[key.replace(/^--/, '')] = value
|
5
|
+
return acc
|
6
|
+
}, {})
|
7
|
+
}
|
8
|
+
const argv = parseArgs(process.argv.slice(2))
|
9
|
+
const frameworkVersion = argv['config.frameworkVersion']
|
10
|
+
|
11
|
+
function readPackage(pkg, context) {
|
12
|
+
const lockPackages = {
|
13
|
+
'@das-fed/cli': frameworkVersion,
|
14
|
+
'@das-fed/ui': frameworkVersion,
|
15
|
+
'@das-fed/utils': frameworkVersion,
|
16
|
+
'@das-fed/web': frameworkVersion,
|
17
|
+
'@das-fed/web-components': frameworkVersion,
|
18
|
+
'mpegts.js': '1.7.3',
|
19
|
+
}
|
20
|
+
Object.keys(pkg.dependencies)
|
21
|
+
.filter((key) => pkg.dependencies[key] && lockPackages[key])
|
22
|
+
.forEach((key) => (pkg.dependencies[key] = lockPackages[key]))
|
23
|
+
Object.keys(pkg.devDependencies)
|
24
|
+
.filter((key) => pkg.dependencies[key] && lockPackages[key])
|
25
|
+
.forEach((key) => (pkg.dependencies[key] = lockPackages[key]))
|
26
|
+
return pkg
|
27
|
+
}
|
28
|
+
|
29
|
+
module.exports = { hooks: { readPackage } }
|
@@ -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,29 +1,29 @@
|
|
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
|
-
```
|
20
|
-
|
21
|
-
## config配置
|
22
|
-
|
23
|
-
### 如需本地开发开启sso登录
|
24
|
-
|
25
|
-
public/config.js,public/config.local.js中设置配置【sso: true, baseURL: 'http://ssoServer.com'】,其中baseURL为某个支持sso登录的环境地址
|
26
|
-
|
27
|
-
|
28
|
-
### 如本地需要登录失效后重定向到登录页面
|
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
|
+
```
|
20
|
+
|
21
|
+
## config配置
|
22
|
+
|
23
|
+
### 如需本地开发开启sso登录
|
24
|
+
|
25
|
+
public/config.js,public/config.local.js中设置配置【sso: true, baseURL: 'http://ssoServer.com'】,其中baseURL为某个支持sso登录的环境地址
|
26
|
+
|
27
|
+
|
28
|
+
### 如本地需要登录失效后重定向到登录页面
|
29
29
|
public/config.js,public/config.local.js中设置配置【noRedireLogin: false】
|
@@ -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,7 @@
|
|
1
|
-
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
"
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
"dev": "das-cli dev",
|
9
|
-
"build": "das-cli build",
|
10
|
-
"preview": "vite preview"
|
11
|
-
}
|
12
|
-
}
|
1
|
+
{
|
2
|
+
"private": "true",
|
3
|
+
"type": "module",
|
4
|
+
"scripts": {
|
5
|
+
"build": "node scripts/build"
|
6
|
+
}
|
7
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="zh-CN">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7
|
+
<title>AIoT 平台</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div id="app"></div>
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"name": "@das-fed-apps/%packageName%",
|
3
|
+
"version": "0.0.0",
|
4
|
+
"type": "module",
|
5
|
+
"scripts": {
|
6
|
+
"dev": "das-cli dev",
|
7
|
+
"build": "das-cli build",
|
8
|
+
"preview": "vite preview"
|
9
|
+
},
|
10
|
+
"dependencies": {
|
11
|
+
"@das-fed/ui": "6.4.0-dev.83",
|
12
|
+
"@das-fed/utils": "6.4.0-dev.83",
|
13
|
+
"@das-fed/web": "6.4.0-dev.83",
|
14
|
+
"vue": "^3.5.13",
|
15
|
+
"vue-router": "^4.5.0",
|
16
|
+
"dayjs": "^1.11.10"
|
17
|
+
},
|
18
|
+
"devDependencies": {
|
19
|
+
"@das-fed/cli": "6.4.0-dev.83",
|
20
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
21
|
+
"typescript": "^5.7.2",
|
22
|
+
"vite": "^5.2.7",
|
23
|
+
"vue-tsc": "^1.6.5"
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import '@das-fed/web/packages/style'
|
2
|
+
|
3
|
+
export default () => {
|
4
|
+
return {
|
5
|
+
microAppName: '%microAppName%',
|
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
|
+
theme: { glob: import.meta.glob('@/**/**/theme/*.ts', { eager: true, import: 'default' }) },
|
9
|
+
i18n: { glob: import.meta.glob('@/**/**/i18n/*.ts', { eager: true, import: 'default' }) },
|
10
|
+
}
|
11
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { createDasWebApp, mainAppFramework } from '@das-fed/web'
|
2
|
+
import '@das-fed/web/packages/style'
|
3
|
+
|
4
|
+
createDasWebApp({
|
5
|
+
root: { component: mainAppFramework.Layout },
|
6
|
+
router: { routers: mainAppFramework.routes },
|
7
|
+
microApps: [
|
8
|
+
{
|
9
|
+
microAppName: '%microAppName%',
|
10
|
+
router: { glob: import.meta.glob('@/views/**/**/router.ts', { eager: true, import: 'default' }) },
|
11
|
+
plugins: { glob: import.meta.glob('@/plugins/*/index.ts', { eager: true, import: 'default' }) },
|
12
|
+
theme: { glob: import.meta.glob('@/**/**/theme/*.ts', { eager: true, import: 'default' }) },
|
13
|
+
i18n: { glob: import.meta.glob('@/**/**/i18n/*.ts', { eager: true, import: 'default' }) },
|
14
|
+
},
|
15
|
+
],
|
16
|
+
})
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { createDasWebApp } from '@das-fed/web'
|
2
|
+
import '@das-fed/web/packages/style'
|
3
|
+
|
4
|
+
createDasWebApp({
|
5
|
+
microAppName: '%microAppName%',
|
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
|
+
theme: { glob: import.meta.glob('@/**/**/theme/*.ts', { eager: true, import: 'default' }) },
|
9
|
+
i18n: { glob: import.meta.glob('@/**/**/i18n/*.ts', { eager: true, import: 'default' }) },
|
10
|
+
})
|