depswriter.py complains 'The command line is t

2019-08-14 06:49发布

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条回答
孤傲高冷的网名
2楼-- · 2019-08-14 07:39

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.

查看更多
登录 后发表回答