简体   繁体   English

Dart编辑器:“工具/生成JavaScript”选项消失了

[英]Dart editor: Tools/Generate JavaScript option disappeared

I just upgraded my Dart editor to the latest version and the option to generate JS has disappeared from the Tools menu. 我刚刚将Dart编辑器升级到最新版本,并且JS生成选项已从“工具”菜单中消失。 I can't find it anywhere. 我在任何地方都找不到。 Does anyone else have this problem or any ideas what to do? 还有其他人有这个问题或想法怎么办吗? Thanks! 谢谢!

It has been removed and you should use Pub build instead: 它已被删除,您应该改用Pub build:

  • Removed the Generate JavaScript menu option. 删除了“生成JavaScript”菜单选项。
    • Users should use pub build to generate javascript. 用户应使用pub build生成javascript。

(From the Google+ post about the update). (摘自有关更新的Google+信息 )。

Configuring the Built-in dart2js Transformer 配置内置的dart2js变压器

In pubspec.yaml: 在pubspec.yaml中:

transformers:
    - $dart2js:
        checked: true
        minify: true
        verbose: true
        analyzeAll: true
        suppressWarnings: true
        suppressHints: true
        terse: true

Triggers on pub_build command performed (not pub get (my stumbling-block :-( )). 在pub_build命令上执行触发器(不是pub get(我的绊脚石:-())。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM