即使路徑正確,javascript – grunt-contrib-less也找不到原始檔
我正在努力為我編寫一個較少的檔案.我有以下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
您可以將目標命名為您想要的內容,但因為較少的是多工,所以需要至少有一個目標.
ofollow,noindex" target="_blank">Docs on configuring tasks with targets.
程式碼日誌版權宣告:
翻譯自:http://stackoverflow.com/questions/17712214/grunt-contrib-less-cannot-find-source-files-even-though-path-is-correct