wepy 插件 压缩

npm install wepy-plugin-filemin --save-dev
module.exports.plugins = {
  'filemin': {
    filter: /\.(json|wxml|xml)$/
  }
};


npm install wepy-compiler-less --save-dev
module.exports = {
  "compilers": {
    less: {
      "compress": true
    }
  }
};

npm install wepy-plugin-uglifyjs --save-dev

module.exports.plugins = {
  'uglifyjs': {
    filter: /\.js$/,
    config: {
    }
  },
};



npm install wepy-plugin-imagemin --save-dev

module.exports.plugins = {
  'imagemin': {
    filter: /\.(jpg|png|jpeg)$/,
    config: {
      'jpg': {
        quality: 80
      },
      'png': {
        quality: 80
      }
    }
  }
};

网上大多的例子是用 VMWare 安装,当我们用 virtualbox 安装的时候,在创建了虚拟机之后需要 执行以下命令,不然会卡在黑屏脚本那里

cd "C:\Program Files\Oracle\VirtualBox\"
.\VBoxManage.exe modifyvm MacOS10.11 --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

cd "C:\Program Files\Oracle\VirtualBox\" 这个是进入你的虚拟机主程序的安装目录里,确认有 VBoxManage.exe 文件
MacOS10.11 改成 你的 虚拟机名称

原文链接:https://blog.csdn.net/chy555chy/article/details/51407410
感谢博主分享~

soter 框架7.2版本的PHP生成 dao 文件报错,原因是7.2废除了each函数,需要改为如下代码(大概558行):

foreach ($params as $tmp=>$p) {
    if ($p{0} == '-') {
        $pname = substr($p, 1);
        $value = true;
        if ($pname{0} == '-') {
            $pname = substr($pname, 1);
            if (strpos($p, '=') !== false) {
                list($pname, $value) = explode('=', substr($p, 2), 2);
            }
        }
        $nextparm = current($params);
        if (!in_array($pname, $noopt) && $value === true && $nextparm !== false && $nextparm{0} != '-') {
            next($params);
            $value = current($params);
        }
        $result[$pname] = $value;
    } else {
        $result[] = $p;
    }
}