【问题标题】:depswriter.py complains 'The command line is too long'depswriter.py 抱怨“命令行太长”
【发布时间】:2012-05-28 06:52:21
【问题描述】:

我尝试在 Windows 7 中使用 'closure-library\closure\bin\build\depswriter.py' 创建 deps.js 文件。我的 python 版本是 2.7.3。它抱怨“命令行太长”。

它在 Linux 中运行良好。

使其在 Windows 中工作的任何解决方案。

【问题讨论】:

    标签: google-closure-library


    【解决方案1】:

    要解决 Windows command-line limitation 和 depswriter.py 的问题,您可以使用以下标志递归扫描目录中的 JavaScript 文件:

    --root               A root directory to scan for JS source files. Paths of JS 
                         files in generated deps file will be relative to this path. 
                         This flag may be specified multiple times.  
    
    --root_with_prefix   A root directory to scan for JS source files, plus a prefix
                         (if either contains a space, surround with quotes).  Paths 
                         in generated deps file will be relative to the root, but 
                         preceded by the prefix. This flag may be specified multiple 
                         times.
    


    在许多情况下,可以使用一个--root 标志来指定整个项目。

    【讨论】:

      猜你喜欢
      • 2012-08-13
      • 1970-01-01
      • 2018-11-25
      • 2011-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-13
      • 2017-08-28
      相关资源
      最近更新 更多