即使路径正确,javascript – grunt-contrib-less也找不到源文件

栏目: 编程工具 · 发布时间: 8年前

内容简介:代码日志版权声明:翻译自:http://stackoverflow.com/questions/17712214/grunt-contrib-less-cannot-find-source-files-even-though-path-is-correct

我正在努力为我编写一个较少的文件.我有以下gruntfile:

less: {
        files: {
            "httpdocs/static/assets/css/result.css": "httpdocs/static/assets/css/dashboard.less"
        }
    },

路径是绝对正确的,我已经三重检查那些文件存在,但是,当我运行grunt我得到以下消息:

Running "less:files" (less) task
>> Destination not written because no source files were provided.

我从gruntfile中遗漏了什么,使其正确编译少文件?我正在撕裂我的头发,因为我知道这可能是一个很简单的事情,但我无法理解.

您的较少配置不起作用,因为您需要在较少的内容中将其放入特定目标.例如

less: {
   yourTarget : {
        files: {
            "httpdocs/static/assets/css/result.css": "httpdocs/static/assets/css/dashboard.less"
        }
   }
},

并运行使用

grunt less:yourTarget

您可以将目标命名为您想要的内容,但因为较少的是多任务,所以需要至少有一个目标.

Docs on configuring tasks with targets.

代码日志版权声明:

翻译自:http://stackoverflow.com/questions/17712214/grunt-contrib-less-cannot-find-source-files-even-though-path-is-correct


以上所述就是小编给大家介绍的《即使路径正确,javascript – grunt-contrib-less也找不到源文件》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。

Big Java Late Objects

Big Java Late Objects

Horstmann, Cay S. / 2012-2 / 896.00元

The introductory programming course is difficult. Many students fail to succeed or have trouble in the course because they don't understand the material and do not practice programming sufficiently. ......一起来看看 《Big Java Late Objects》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具