Browse Source

feat: cloth with deploy

ryanemax 1 week ago
parent
commit
0814ab3df8

+ 9 - 8
angular.json

@@ -3,7 +3,7 @@
   "version": 1,
   "newProjectRoot": "projects",
   "projects": {
-    "cloth-dit-web": {
+    "cloth": {
       "projectType": "application",
       "schematics": {
         "@schematics/angular:component": {
@@ -38,13 +38,13 @@
               "budgets": [
                 {
                   "type": "initial",
-                  "maximumWarning": "500kB",
-                  "maximumError": "1MB"
+                  "maximumWarning": "5MB",
+                  "maximumError": "10MB"
                 },
                 {
                   "type": "anyComponentStyle",
-                  "maximumWarning": "4kB",
-                  "maximumError": "8kB"
+                  "maximumWarning": "5MB",
+                  "maximumError": "8MB"
                 }
               ],
               "outputHashing": "all"
@@ -61,10 +61,10 @@
           "builder": "@angular/build:dev-server",
           "configurations": {
             "production": {
-              "buildTarget": "cloth-dit-web:build:production"
+              "buildTarget": "cloth:build:production"
             },
             "development": {
-              "buildTarget": "cloth-dit-web:build:development"
+              "buildTarget": "cloth:build:development"
             }
           },
           "defaultConfiguration": "development"
@@ -88,7 +88,8 @@
               }
             ],
             "styles": [
-              "src/styles.scss"
+              "src/styles.scss",
+              "node_modules/swiper/swiper-bundle.min.css"
             ]
           }
         }

+ 3 - 3
cloth-dit-web/angular.json

@@ -3,7 +3,7 @@
   "version": 1,
   "newProjectRoot": "projects",
   "projects": {
-    "cloth-dit-web": {
+    "cloth": {
       "projectType": "application",
       "schematics": {
         "@schematics/angular:component": {
@@ -61,10 +61,10 @@
           "builder": "@angular/build:dev-server",
           "configurations": {
             "production": {
-              "buildTarget": "cloth-dit-web:build:production"
+              "buildTarget": "cloth:build:production"
             },
             "development": {
-              "buildTarget": "cloth-dit-web:build:development"
+              "buildTarget": "cloth:build:development"
             }
           },
           "defaultConfiguration": "development"

+ 4 - 4
cloth-dit-web/src/app/app.scss

@@ -1,4 +1,4 @@
-@import 'swiper/css';
-@import 'swiper/css/pagination';
-@import 'swiper/css/navigation';
-@import 'swiper/css/effect-fade';
+// @import 'swiper/css';
+// @import 'swiper/css/pagination';
+// @import 'swiper/css/navigation';
+// @import 'swiper/css/effect-fade';

+ 3 - 1
cloth-dit-web/src/index.html

@@ -2,10 +2,12 @@
 <html lang="en">
 <head>
   <meta charset="utf-8">
-  <title>ClothDitWeb</title>
+  <title>这衣 - 预览版</title>
   <base href="/">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="icon" type="image/x-icon" href="favicon.ico">
+  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap">
+
 </head>
 <body>
   <app-root></app-root>

+ 0 - 1
cloth-dit-web/src/modules/cloth/color/pages-fitting-room/pages-fitting-room/pages-fitting-room.scss

@@ -1,4 +1,3 @@
-@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');
 
 :root {
   --primary-color: #667eea;

+ 15 - 0
deploy.ps1

@@ -0,0 +1,15 @@
+cd cloth-dit-web/
+
+set NODE_OPTIONS=–max_old_space_size=16000
+node ./node_modules/@angular/cli/bin/ng build --base-href="/dev/jxufe/cloth/"
+
+# 清空旧文件目录
+obsutil rm obs://nova-cloud/dev/jxufe/cloth -r -f -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com"
+
+# 同步文件目录
+obsutil sync ./dist/cloth/browser obs://nova-cloud/dev/jxufe/cloth  -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com" -acl=public-read
+
+# 授权公开可读
+obsutil chattri obs://nova-cloud/dev/jxufe/cloth -r -f -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com" -acl=public-read
+
+cd ..