depswriter.py complains 'The command line is too long'

孤街醉人 提交于 2019-12-13 00:12:00

问题


I tried to create deps.js file using 'closure-library\closure\bin\build\depswriter.py' in Windows 7. My python version is 2.7.3. Its complaining 'The command line is too long'.

Its working perfectly fine in Linux.

Any solution to make it work in windows.


回答1:


To work around the Windows command-line limitation with depswriter.py, you can use the following flags to recursively scan directories for JavaScript files:

--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.


In many cases, an entire project can be specified using one --root flag.



来源:https://stackoverflow.com/questions/10780502/depswriter-py-complains-the-command-line-is-too-long

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!