2014-02-25 133 views
2

我有一個非常簡單的LESS文件,現在只需導入Bootstrap。我使用grunt[email protected]在保存([email protected])上編譯LESS文件。LESS:無法識別的輸入「@import ...」

我的文件是這樣的:

@charset "utf-8"; 
/** 
* This is the root style file for the app 
* to include styles in your html, you only need to include either: 
* dist/styles.dev.css (for development) 
* dist/styles.css (for production) 
*/ 

// Libraries 
@import "../lib/bootstrap/less/bootstrap" 

// Our own files 

,我收到以下錯誤,每當我嘗試運行我的less:dev任務。

Running "less:dev" (less) task 
>> ParseError: Unrecognised input in style/styles.less on line 10, column 1: 
>> 9 // Libraries 
>> 10 @import "../lib/bootstrap/less/bootstrap" 
>> 11 

我試圖消除一切從除導入行的文件,它仍然失敗,那麼一些奇怪與@import指令回事。

任何想法?

回答

4

使用分號後@import

@import "../lib/bootstrap/less/bootstrap"; 
+1

哎呦。好點。 LESS並不只是這麼說,而不是對「@」字眼看起來很挑剔。 – GTF