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

Compress folder on grunt is not working

本文关键字:文件夹 不起作用 压缩 grunt      更新时间:2023-09-26

我正在尝试压缩一个文件夹。我在Gruntfile.js 中使用了以下代码

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

文件夹结构

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

但它不起作用。我是新手。我错过什么了吗?为什么它不起作用?

请帮忙,谢谢

我刚刚用你的文件夹结构运行了你的conf,它对我很有效,我在你的文件夹中有一个myapp.zip/主文件夹

你的nodeJS版本(0.10或0.12)grunt和compression(我的compression目前是0.9.1)更新了吗?

你能复制控制台的输出吗?