浏览代码

Fixing bugs

Sebastien L 3 年之前
父节点
当前提交
7fd87eeba5

+ 1 - 1
buildFirmware.sh

@@ -49,5 +49,5 @@ then
 else
     echo "Generating build artifact zip file"
     zip -r build_output.zip build
-    zip build/${artifact_file_name} partitions*.csv build/*.bin build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flash_project_args build/size_*.txt
+    zip build/${artifact_file_name} partitions*.csv components/ build/*.bin build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flash_project_args build/size_*.txt
 fi

文件差异内容过多而无法显示
+ 0 - 0
components/wifi-manager/webapp/dist/index.html


二进制
components/wifi-manager/webapp/dist/index.html.gz


文件差异内容过多而无法显示
+ 0 - 0
components/wifi-manager/webapp/dist/js/index.7581c6.bundle.js


二进制
components/wifi-manager/webapp/dist/js/index.7581c6.bundle.js.gz


文件差异内容过多而无法显示
+ 0 - 0
components/wifi-manager/webapp/dist/js/index.ad2bb1.bundle.js


二进制
components/wifi-manager/webapp/dist/js/index.ad2bb1.bundle.js.gz


文件差异内容过多而无法显示
+ 0 - 0
components/wifi-manager/webapp/dist/js/index.ad2bb1.bundle.js.map


文件差异内容过多而无法显示
+ 0 - 0
components/wifi-manager/webapp/dist/js/node_vendors.7581c6.bundle.js


二进制
components/wifi-manager/webapp/dist/js/node_vendors.7581c6.bundle.js.gz


文件差异内容过多而无法显示
+ 0 - 0
components/wifi-manager/webapp/dist/js/node_vendors.ad2bb1.bundle.js


二进制
components/wifi-manager/webapp/dist/js/node_vendors.ad2bb1.bundle.js.gz


文件差异内容过多而无法显示
+ 0 - 0
components/wifi-manager/webapp/dist/js/node_vendors.ad2bb1.bundle.js.map


+ 2 - 0
components/wifi-manager/webapp/package.json

@@ -20,6 +20,7 @@
     "autoprefixer": "^10.4.2",
     "babel": "^6.23.0",
     "babel-loader": "^8.2.3",
+    "babel-runtime": "^6.26.0",
     "bootswatch": "^5.1.3",
     "clean-webpack-plugin": "^4.0.0",
     "commander": "^8.3.0",
@@ -46,6 +47,7 @@
     "imagemin-svgo": "^10.0.1",
     "js-cookie": "^3.0.1",
     "lodash": "^4.17.21",
+    "lodash-es": "^4.17.21",
     "lodash-webpack-plugin": "^0.11.6",
     "mini-css-extract-plugin": "^2.5.2",
     "node-sass": "^7.0.1",

+ 2 - 2
components/wifi-manager/webapp/src/index.ts

@@ -1,6 +1,6 @@
-//import $ from "jquery";
-//import * as _ from 'lodash';
+
 import 'bootstrap';
 import './sass/main.scss';
 import './assets/images/favicon-32x32.png';
 import './js/custom.js'; 
+

+ 2 - 2
components/wifi-manager/webapp/src/js/custom.js

@@ -1,5 +1,5 @@
-import he from 'he';
-import { Promise } from 'es6-promise';
+var he = require('he');
+var Promise = require('es6-promise').Promise;
 window.bootstrap = require('bootstrap');
 import Cookies from 'js-cookie';
 

+ 2 - 3
components/wifi-manager/webapp/tsconfig.json

@@ -6,9 +6,8 @@
       "@node_modules/*" : ["./node_modules/*"]},
     "outDir": "./dist/",
     "noImplicitAny": true,
-    "sourceMap": true,
-    "module": "es6",
-    "target": "es2018",
+    "target": "es6",
+    "module": "CommonJS",
     "composite": true,
 //    "jsx": "react",
     "allowJs": true,

+ 2 - 2
components/wifi-manager/webapp/webapp.cmake

@@ -1,5 +1,5 @@
 target_add_binary_data( __idf_wifi-manager webapp/dist/css/index.f2de74635f23b31fbdce.css.gz BINARY)
 target_add_binary_data( __idf_wifi-manager webapp/dist/favicon-32x32.png BINARY)
 target_add_binary_data( __idf_wifi-manager webapp/dist/index.html.gz BINARY)
-target_add_binary_data( __idf_wifi-manager webapp/dist/js/index.7581c6.bundle.js.gz BINARY)
-target_add_binary_data( __idf_wifi-manager webapp/dist/js/node_vendors.7581c6.bundle.js.gz BINARY)
+target_add_binary_data( __idf_wifi-manager webapp/dist/js/index.ad2bb1.bundle.js.gz BINARY)
+target_add_binary_data( __idf_wifi-manager webapp/dist/js/node_vendors.ad2bb1.bundle.js.gz BINARY)

+ 10 - 10
components/wifi-manager/webapp/webpack.c

@@ -6,29 +6,29 @@ extern const uint8_t _favicon_32x32_png_start[] asm("_binary_favicon_32x32_png_s
 extern const uint8_t _favicon_32x32_png_end[] asm("_binary_favicon_32x32_png_end");
 extern const uint8_t _index_html_gz_start[] asm("_binary_index_html_gz_start");
 extern const uint8_t _index_html_gz_end[] asm("_binary_index_html_gz_end");
-extern const uint8_t _index_7581c6_bundle_js_gz_start[] asm("_binary_index_7581c6_bundle_js_gz_start");
-extern const uint8_t _index_7581c6_bundle_js_gz_end[] asm("_binary_index_7581c6_bundle_js_gz_end");
-extern const uint8_t _node_vendors_7581c6_bundle_js_gz_start[] asm("_binary_node_vendors_7581c6_bundle_js_gz_start");
-extern const uint8_t _node_vendors_7581c6_bundle_js_gz_end[] asm("_binary_node_vendors_7581c6_bundle_js_gz_end");
+extern const uint8_t _index_ad2bb1_bundle_js_gz_start[] asm("_binary_index_ad2bb1_bundle_js_gz_start");
+extern const uint8_t _index_ad2bb1_bundle_js_gz_end[] asm("_binary_index_ad2bb1_bundle_js_gz_end");
+extern const uint8_t _node_vendors_ad2bb1_bundle_js_gz_start[] asm("_binary_node_vendors_ad2bb1_bundle_js_gz_start");
+extern const uint8_t _node_vendors_ad2bb1_bundle_js_gz_end[] asm("_binary_node_vendors_ad2bb1_bundle_js_gz_end");
 const char * resource_lookups[] = {
 	"/css/index.f2de74635f23b31fbdce.css.gz",
 	"/favicon-32x32.png",
 	"/index.html.gz",
-	"/js/index.7581c6.bundle.js.gz",
-	"/js/node_vendors.7581c6.bundle.js.gz",
+	"/js/index.ad2bb1.bundle.js.gz",
+	"/js/node_vendors.ad2bb1.bundle.js.gz",
 ""
 };
 const uint8_t * resource_map_start[] = {
 	_index_f2de74635f23b31fbdce_css_gz_start,
 	_favicon_32x32_png_start,
 	_index_html_gz_start,
-	_index_7581c6_bundle_js_gz_start,
-	_node_vendors_7581c6_bundle_js_gz_start
+	_index_ad2bb1_bundle_js_gz_start,
+	_node_vendors_ad2bb1_bundle_js_gz_start
 };
 const uint8_t * resource_map_end[] = {
 	_index_f2de74635f23b31fbdce_css_gz_end,
 	_favicon_32x32_png_end,
 	_index_html_gz_end,
-	_index_7581c6_bundle_js_gz_end,
-	_node_vendors_7581c6_bundle_js_gz_end
+	_index_ad2bb1_bundle_js_gz_end,
+	_node_vendors_ad2bb1_bundle_js_gz_end
 };

+ 13 - 8
components/wifi-manager/webapp/webpack.config.js

@@ -37,12 +37,15 @@ class BuildEventsHook {
 
 
 module.exports = (env, options) => (
-  merge(env.WEBPACK_SERVE ?  devserver : {},
+  merge(
+    env.WEBPACK_SERVE ?  devserver : {},
+    env.ANALYZE_SIZE?{ plugins: [ new BundleAnalyzerPlugin() ]}:{},
     {
       entry: 
       {
           index: './src/index.ts'
       },
+      devtool:"source-map",
       module: {
         rules: [
           {
@@ -131,7 +134,7 @@ module.exports = (env, options) => (
           },          
           {
             test: /\.js$/,
-            //exclude: /(node_modules|bower_components)/,
+            exclude: /(node_modules|bower_components)/,
             use: {
               loader: "babel-loader",
               options: {
@@ -162,6 +165,8 @@ module.exports = (env, options) => (
             use: 'ts-loader',
             exclude: /node_modules/,
           },
+          
+          
         ],
       },
       plugins: [
@@ -211,11 +216,11 @@ module.exports = (env, options) => (
         }),
         new webpack.ProvidePlugin({
           $: "jquery",
-          jQuery: "jquery",
-          "window.jQuery": "jquery",
-          Popper: ["popper.js", "default"],
-          Util: "exports-loader?Util!bootstrap/js/dist/util",
-          Dropdown: "exports-loader?Dropdown!bootstrap/js/dist/dropdown",
+//          jQuery: "jquery",
+  //        "window.jQuery": "jquery",
+    //      Popper: ["popper.js", "default"],
+          // Util: "exports-loader?Util!bootstrap/js/dist/util",
+          // Dropdown: "exports-loader?Dropdown!bootstrap/js/dist/dropdown",
         }),
         new CompressionPlugin({
           //filename: '[path].gz[query]',
@@ -373,7 +378,7 @@ extern const uint8_t * resource_map_end[];`;
               },
             },
           }),  
-          //new BundleAnalyzerPlugin()
+          
 
         ],
         splitChunks: {

+ 1 - 1
components/wifi-manager/webapp/webpack.h

@@ -1,6 +1,6 @@
 /***********************************
 webpack_headers
-dist/css/index.f2de74635f23b31fbdce.css.gz,dist/favicon-32x32.png,dist/index.html.gz,dist/js/index.7581c6.bundle.js.gz,dist/js/node_vendors.7581c6.bundle.js.gz
+dist/css/index.f2de74635f23b31fbdce.css.gz,dist/favicon-32x32.png,dist/index.html.gz,dist/js/index.ad2bb1.bundle.js.gz,dist/js/node_vendors.ad2bb1.bundle.js.gz
 ***********************************/
 #pragma once
 #include <inttypes.h>

+ 0 - 1
components/wifi-manager/webapp/webpack/webpack.dev.js

@@ -135,7 +135,6 @@ module.exports ={
     entry: {
         test: './src/test.ts',
     },
-    devtool:"source-map",
     devServer: {
 
         

部分文件因为文件数量过多而无法显示