简体   繁体   English

Grunt上的压缩文件夹不起作用

[英]Compress folder on grunt is not working

I am trying to compress a folder on grunting. 我正试图压缩一个文件夹。 I used the following code in Gruntfile.js 我在Gruntfile.js中使用了以下代码

    compress: {
      main : {
        options : {
          archive : "myapp.zip"
        },
        files : [
          { expand: true, src : "src/partials/templates", cwd : "target/dev/" }
        ]
      }
    }

Folder structure 资料夹结构

--mainfolder
----src
------partials
----target
------dev
----gruntfile.js

But it is not working. 但这是行不通的。 I am new to this. 我是新来的。 Did i miss anything? 我有想念吗? Why it is not working? 为什么不起作用?

Please help, Thanks. 请帮忙,谢谢。

I've just run your conf with your folder strcture and it worked for me, I have a myapp.zip in your ./mainfolder 我刚刚使用文件夹结构运行了conf,它对我有用,我在您的./mainfolder中有一个myapp.zip

Are you up do date with your nodeJS version (0.10 or 0.12) grunt and compress (my compress is 0.9.1 currently)? 您是否对nodeJS版本(0.10或0.12)发出咕unt声和压缩(我的压缩当前为0.9.1)更新了?

Could you copy the output of your console? 您可以复制控制台的输出吗?

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

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