在durandal.js中跟踪优化器问题 [英] Tracking down optimizer issues in durandal.js

查看:48
本文介绍了在durandal.js中跟踪优化器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有数百个视图模型的大型应用程序,但是当我运行优化器时,它并没有将它们合并到main-built.js中,只是清除了文件。



有没有办法让优化器为您提供有关错误发生位置的更多信息?

解决方案

以下是所有可用的选项


  1. -mode 指示优化器是否仅应生成 r。 js配置或实际构建优化的JS应用程序。默认值build

  2. -源包含应用程序源的文件夹的路径。

  3. - -config 定制r.js配置文件的路径,该文件将用作生成的配置的基础。

  4. -verbose 应该使用详细的控制台日志记录。默认值false

  5. -loader 指示要针对杏仁或需要进行优化的脚本加载器。默认值almond

  6. -plugin 用于将视图优化为最终构建文件的视图插件。默认值text

  7. -pluginExtension 查看文件扩展名。默认值.html

使用优化器就像这样:

  optimizer.exe --source c:\project1\app\ --mode生成

因此,也许您应该尝试以下操作:

  optimizer.exe --verbose true 

如果这不起作用..那么您可以随时拉下源代码并尝试在本地调试。 / p>

I have a large application with a few hundred viewmodels but when I run the optimizer it doesn't combine them into the main-built.js, it just clears out the file.

Is there any way to get the optimizer to give you more information on where it had an error?

解决方案

Here are all the options available

  1. --mode Indicates whether the optimizer should only 'generate' the r.js config or actually 'build' the optimized JS application. Default value build
  2. --source The path to the folder which contains the application source.
  3. --config The path to the customized r.js configuration file to be used as a base for the generated configuration.
  4. --verbose Indicates that verbose console logging should be used. Default value false
  5. --loader Indicates which script loader to optimize for 'almond' or 'require'. Default value almond
  6. --plugin The view plugin used to optimize views into the final build file. Default value text
  7. --pluginExtension The view file extension. Default value .html

Using the optimizer is like so:

optimizer.exe --source c:\project1\app\ --mode generate

So, maybe you should try this:

optimizer.exe --verbose true

and if that doesn't work.. then you can always pull down the source and try and debug it locally.

这篇关于在durandal.js中跟踪优化器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆