2015-01-16 51 views
0

我正在使用grunt-angular-gettext。angular-gettext庫 - 無法編譯JSON文件?

我想編譯採購訂單文件夾中的PO文件,並輸出JSON文件在不同的文件夾中。文件夾和JSON文件沒有被生成。 下面是瑣碎的配置爲編譯:

nggettext_compile: { 
      all: { 
       options: { 
        format: "json" 
       }, 
       files: [ 
        { 
         expand: true, 
         cwd:"../", 
         src: ["po/*.po"], 
         dest: '../lang/', 
         ext: ".json" 
        } 
       ] 
      }, 
     }, 

誰能幫我配置以產生「郎」文件夾JSON文件。 「lang」文件夾與「po」文件夾處於同一級別。 我將如何指定目標文件夾的相對路徑?

謝謝。

回答

1

嘗試

nggettext_compile: { 
      all: { 
       options: { 
        format: "json" 
       }, 
       files: [ 
        { 
         expand: true, 
         cwd:"[po-loc]", 
         src: ["*.po"], 
         dest: '[dest-loc]', 
         ext: ".json" 
        } 
       ] 
      }, 
     }, 

變化[PO-LOC]向莆的位於
其中並改變[DEST-LOC]到您想擁有位於使用全路徑,以便沒有JSON文件../