CrazyIter 5 years ago
parent
commit
c691f89ce0

+ 1 - 1
TEAMModelOS.SmartClass/Program.cs

@@ -18,7 +18,7 @@ public static void Main(string[] args)
         }
 
         public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
-            WebHost.CreateDefaultBuilder(args).UseUrls("http://*:6000")
+            WebHost.CreateDefaultBuilder(args).UseUrls("http://*:60000")
                 .UseStartup<Startup>();
     }
 }

+ 1 - 1
TEAMModelOS.SmartTeach/Program.cs

@@ -18,7 +18,7 @@ public static void Main(string[] args)
         }
 
         public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
-           WebHost.CreateDefaultBuilder(args).UseUrls("http://*:7000")
+            WebHost.CreateDefaultBuilder(args).UseUrls("http://*:50000")
                 .UseStartup<Startup>();
     }
 }

+ 2 - 2
TEAMModelOS.SmartTeach/Properties/launchSettings.json

@@ -18,10 +18,10 @@
     "TEAMModelOS.SmartTeach": {
       "commandName": "Project",
       "launchBrowser": true,
+      "applicationUrl": "https://localhost:7001;http://localhost:7000",
       "environmentVariables": {
         "ASPNETCORE_ENVIRONMENT": "Development"
-      },
-      "applicationUrl": "https://localhost:7001;http://localhost:7000"
+      }
     }
   }
 }

+ 3 - 0
TEAMModelOS.TeachZone/.filenesting.json

@@ -0,0 +1,3 @@
+{
+    "help":"https://go.microsoft.com/fwlink/?linkid=866610"
+}

+ 1 - 1
TEAMModelOS.TeachZone/Program.cs

@@ -18,7 +18,7 @@ public static void Main(string[] args)
         }
 
         public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
-            WebHost.CreateDefaultBuilder(args).UseUrls("http://*:8000")
+             WebHost.CreateDefaultBuilder(args).UseUrls("http://*:40000")
                 .UseStartup<Startup>();
     }
 }

+ 51 - 6
TEAMModelOS.TeachZone/package.json

@@ -6,22 +6,38 @@
     "url": "https://habook.com.tw"
   },
   "license": "MIT",
-  "scripts": {},
+  "scripts": {
+    "dev": "cross-env ASPNETCORE_ENVIRONMENT=Development NODE_ENV=development dotnet run",
+    "build": "npm run build-vendor:prod && npm run build:prod",
+    "build:prod": "cross-env NODE_ENV=production webpack --progress --hide-modules",
+    "build-vendor:prod": "cross-env NODE_ENV=production webpack --config webpack.config.vendor.js --progress",
+    "build-vendor:dev": "cross-env NODE_ENV=development webpack --config webpack.config.vendor.js --progress",
+    "lint": "eslint -c ./.eslintrc.js ClientApp/**/*.js  ClientApp/**/*.vue  ClientApp/**/*.json webpack*.js",
+    "install": "npm run build-vendor:dev",
+    "update-packages": "npx npm-check -u"
+  },
   "dependencies": {
     "animate.css": "^3.7.0",
     "axios": "^0.18.0",
     "bcryptjs": "^2.4.3",
     "core-js": "^2.5.3",
     "echarts": "^4.2.1",
-    "iview": "^3.4.1",
+    "iview": "^3.3.3",
+    "jquery": "^3.3.1",
     "jwt-decode": "^2.2.0",
     "less": "^3.9.0",
+    "moment": "^2.23.0",
+    "videojs-contrib-hls": "^5.15.0",
+    "videojs-contrib-hls.js": "^3.2.0",
     "vue": "^2.6.9",
+    "vue-calendar-component": "^2.7.4",
+    "vue-full-calendar": "^2.7.0",
+    "vue-fullcalendar": "^1.0.9",
     "vue-infinite-loading": "^2.4.3",
+    "vue-jlunar-datepicker": "^2.3.0",
+    "vue-lunar-full-calendar": "^1.2.2",
     "vue-router": "^3.0.2",
     "vue-scroll": "^2.1.9",
-    "vue-server-renderer": "^2.6.9",
-    "vue-template-compiler": "^2.6.9",
     "vue-video-player": "^5.0.2",
     "vuex": "^3.1.0",
     "vuex-router-sync": "^5.0.0"
@@ -47,9 +63,19 @@
     "@fortawesome/free-solid-svg-icons": "^5.7.0",
     "@fortawesome/vue-fontawesome": "^0.1.5",
     "aspnet-webpack": "^3.0.0",
+    "autoprefixer": "^7.1.2",
+    "babel-core": "^6.22.1",
     "babel-eslint": "^10.0.1",
+    "babel-helper-vue-jsx-merge-props": "^2.0.3",
     "babel-loader": "^8.0.5",
     "babel-plugin-import": "^1.11.0",
+    "babel-plugin-syntax-jsx": "^6.18.0",
+    "babel-plugin-transform-runtime": "^6.22.0",
+    "babel-plugin-transform-vue-jsx": "^3.5.0",
+    "babel-preset-env": "^1.3.2",
+    "babel-preset-stage-2": "^6.22.0",
+    "chalk": "^2.0.1",
+    "copy-webpack-plugin": "^4.0.1",
     "cross-env": "^5.2.0",
     "css-loader": "^2.1.1",
     "eslint": "^5.15.2",
@@ -60,20 +86,39 @@
     "eslint-plugin-promise": "^4.0.1",
     "eslint-plugin-standard": "^4.0.0",
     "event-source-polyfill": "^1.0.5",
+    "extract-text-webpack-plugin": "^3.0.0",
     "file-loader": "^3.0.1",
     "font-awesome": "^4.7.0",
+    "friendly-errors-webpack-plugin": "^1.6.1",
+    "html-webpack-plugin": "^2.30.1",
     "less-loader": "^4.1.0",
     "mini-css-extract-plugin": "^0.5.0",
-    "node-sass": "^4.8.2",
+    "node-notifier": "^5.1.2",
+    "node-sass": "^4.12.0",
     "optimize-css-assets-webpack-plugin": "^5.0.1",
+    "ora": "^1.2.0",
+    "portfinder": "^1.0.13",
+    "postcss-import": "^11.0.0",
+    "postcss-loader": "^2.0.8",
+    "postcss-url": "^7.2.1",
+    "rimraf": "^2.6.0",
     "sass-loader": "^7.1.0",
+    "semver": "^5.3.0",
+    "shelljs": "^0.7.6",
     "style-loader": "^0.23.1",
+    "uglifyjs-webpack-plugin": "^1.1.1",
     "url-loader": "^1.1.2",
     "vue-i18n": "^8.9.0",
     "vue-loader": "^15.7.0",
+    "vue-server-renderer": "^2.6.9",
+    "vue-style-loader": "^3.1.2",
+    "vue-template-compiler": "^2.6.9",
+    "vue-template-loader": "^1.0.0",
     "webpack": "^4.29.0",
+    "webpack-bundle-analyzer": "^2.9.0",
     "webpack-cli": "^3.3.0",
     "webpack-dev-server": "^3.1.14",
-    "webpack-hot-middleware": "^2.21.2"
+    "webpack-hot-middleware": "^2.21.2",
+    "webpack-merge": "^4.1.0"
   }
 }

+ 32 - 20
TEAMModelOS.TeachZone/webpack.config.js

@@ -1,4 +1,4 @@
- const path = require('path')
+const path = require('path')
 const webpack = require('webpack')
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
@@ -9,12 +9,12 @@ module.exports = () => {
   // console.log('Building for \x1b[33m%s\x1b[0m', process.env.NODE_ENV)
 
   const isDevBuild = !(process.env.NODE_ENV && process.env.NODE_ENV === 'production')
-  
+
   const extractCSS = new MiniCssExtractPlugin({
     filename: 'style.css'
   })
   return [{
-    mode: (isDevBuild ? 'development' :'production'  ),
+    mode: (isDevBuild ? 'development' : 'production'),
     stats: { modules: false },
     entry: { 'main': './ClientApp/boot-app.js' },
     resolve: {
@@ -26,13 +26,13 @@ module.exports = () => {
         'utils': path.resolve(__dirname, './ClientApp/utils'),
         'api': path.resolve(__dirname, './ClientApp/store/api'),
         '@': path.resolve(__dirname, './ClientApp'),
-      }: {
-        'components': path.resolve(__dirname, './ClientApp/components'),
-        'views': path.resolve(__dirname, './ClientApp/views'),
-        'utils': path.resolve(__dirname, './ClientApp/utils'),
-        'api': path.resolve(__dirname, './ClientApp/store/api'),
-        '@': path.resolve(__dirname, './ClientApp'),
-      }
+      } : {
+          'components': path.resolve(__dirname, './ClientApp/components'),
+          'views': path.resolve(__dirname, './ClientApp/views'),
+          'utils': path.resolve(__dirname, './ClientApp/utils'),
+          'api': path.resolve(__dirname, './ClientApp/store/api'),
+          '@': path.resolve(__dirname, './ClientApp'),
+        }
     },
     output: {
       path: path.join(__dirname, bundleOutputDir),
@@ -41,12 +41,24 @@ module.exports = () => {
     },
     module: {
       rules: [
-        { test: /\.vue$/, include: /ClientApp/, use: 'vue-loader' },
-        { test: /\.js$/, include: /ClientApp/, use: 'babel-loader' },
+        {
+          test: /\.vue$/, use: 'vue-loader', include: [
+            //path.resolve(__dirname, '/ClientApp/'),
+            //path.resolve(__dirname, '/node_modules/'),
+            path.resolve(__dirname, '/')
+          ]
+        },
+        {
+          test: /\.js$/, use: 'babel-loader', include: [
+            //path.resolve(__dirname, '/ClientApp/'),
+            //path.resolve(__dirname, '/node_modules/'),
+            path.resolve(__dirname, '/')
+          ]
+        },
         { test: /\.css$/, use: isDevBuild ? ['style-loader', 'css-loader'] : [MiniCssExtractPlugin.loader, 'css-loader'] },
         { test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' },
         { test: /\.(eot|ttf|woff|woff2)$/, loader: 'file-loader' },
-        { test: /\.less$/, use: [{ loader: "style-loader"}, {loader: "css-loader"}, {loader: "less-loader", options: { javascriptEnabled: true }}] }
+        { test: /\.less$/, use: [{ loader: "style-loader" }, { loader: "css-loader" }, { loader: "less-loader", options: { javascriptEnabled: true } }] }
       ]
     },
     plugins: [
@@ -61,12 +73,12 @@ module.exports = () => {
         moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk
       })
     ] : [
-      extractCSS,
-      new OptimizeCSSPlugin({
-        cssProcessorOptions: {
-          safe: true
-        }
-      })
-    ])
+        extractCSS,
+        new OptimizeCSSPlugin({
+          cssProcessorOptions: {
+            safe: true
+          }
+        })
+      ])
   }]
 }

+ 18 - 5
TEAMModelOS.TeachZone/webpack.config.vendor.js

@@ -2,26 +2,38 @@ const path = require('path')
 const webpack = require('webpack')
 const MiniCssExtractPlugin = require('mini-css-extract-plugin')
 const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
-
+const VueLoaderPlugin = require('vue-loader/lib/plugin')
 module.exports = () => {
   // console.log('Building vendor files for \x1b[33m%s\x1b[0m', process.env.NODE_ENV)
 
   const isDevBuild = !(process.env.NODE_ENV && process.env.NODE_ENV === 'production')
-  
+
   const extractCSS = new MiniCssExtractPlugin({
     filename: 'vendor.css'
   })
 
   return [{
-    mode: (isDevBuild ? 'development' : 'production' ),
+    mode: (isDevBuild ? 'development' : 'production'),
     stats: { modules: false },
     resolve: {
       extensions: ['.js']
     },
     module: {
       rules: [
-        { test: /\.vue$/, include: /ClientApp/, use: 'vue-loader' },
-        { test: /\.js$/, include: /ClientApp/, use: 'babel-loader' },
+        {
+          test: /\.vue$/, use: 'vue-loader', include: [
+            //path.resolve(__dirname, '/ClientApp/'),
+            //path.resolve(__dirname, '/node_modules/'),
+            path.resolve(__dirname, '/')
+          ]
+        },
+        {
+          test: /\.js$/, use: 'babel-loader', include: [
+            //path.resolve(__dirname, '/ClientApp/'),
+            //path.resolve(__dirname, '/node_modules/'),
+            path.resolve(__dirname, '/')
+          ]
+        },
         { test: /\.css$/, use: isDevBuild ? ['style-loader', 'css-loader'] : [MiniCssExtractPlugin.loader, 'css-loader'] },
         { test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' },
         { test: /\.(eot|ttf|woff|woff2)$/, loader: 'file-loader' },
@@ -38,6 +50,7 @@ module.exports = () => {
       library: '[name]_[hash]'
     },
     plugins: [
+      new VueLoaderPlugin(),
       extractCSS,
       new OptimizeCSSPlugin({
         cssProcessorOptions: {