gpt4 book ai didi

extjs - Sencha 命令 : Support for object/array destructuring

转载 作者:行者123 更新时间:2023-12-04 10:46:38 25 4
gpt4 key购买 nike

Sencha Cmd 是否可以针对较新的 js 功能进行调整或替换为其他缩小器/优化器?
还是支持随附最新版本?

最佳答案

由于版本没有明确,我就针对4.2.6进行说明

  • 转到项目的根目录并运行
  • npm init
  • 安装 babel:
  • npm install --save-dev  babel-cli babel-preset-es2015
  • 添加到您的 package.json运行脚本:
  • "scripts" : {
    "build-prod": "./node_modules/.bin/babel es6 -d app --comments=false --compact=true",
    "build-debug": "./node_modules/.bin/babel es6 -d app --sourceMaps=true",
    "watch": "./node_modules/.bin/babel es6 -d app --watch"
    },
  • app 移动源代码和 app.js到另一个文件夹(例如将其称为 es6 )
  • mv app.js app
    mv app es6
  • 并创建 build.xml在 root 中并将新任务粘贴到项目标签中:
  •     <target name="-before-build">
    <x-shell reloadprofile="true" dir="${basedir}">
    npm run build-debug
    </x-shell>
    </target>

    关于extjs - Sencha 命令 : Support for object/array destructuring,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59675767/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com