2016-09-20 8 views
0

私はnpmが初めてです。pugjs(jade-lang)をEmber-CLIに統合するにはどうすればいいですか?

アプリケーションを設計するためにember-cliをダウンロードしましたが、私はpugjsをインストールしてhtmlをレンダリングします。

私は不必要なhtmlコードをたくさん書く必要はありません。

pugjs(jade-lang)をEmber-CLIと統合する方法はありますか。

ありがとうございました。

の1- https://github.com/sindresorhus/broccoli-jade

2 - https://www.npmjs.com/package/generator-ember-jade-zurb-express//Yoeman generator which may help you to scaffold your project.

しかし、私は強くemblemjsを使用することをお勧めいたします:

答えて

1

は、次のリソースを確認してくださいブロッコリージェイドコンパイラを追加する必要があり、より多くの情報のためにここでロード。プロジェクトの概要は次のとおりです。

p Introducing Emblem.js: a new templating language 
     that compiles to Handlebars.js 

    ul 
     li Indentation-based (like Slim, Jade, HAML, etc.) 
     li Compiles to Handlebars 

; full compatibility with 
    both custom and built-in Handlebars helpers 
    li Ember.js-friendly syntax and full compatibility 
    with auto-updating functionality. 

/Emblem is HTML5-aware; Render HTML if a line starts with 
    known HTML tag, else invoke HB helper or perform property lookup. 
    These defaults are easily overridable when necessary. 
ul 
    each person in people 
    li = person.name 

section.ember-features 
/easy, natural Ember bindAttr support 
    h1 class=foo The class name of this element is bound to `foo` 
    p class=isActive:flashing:inactive Ember.js bound css classes 

/implicit Ember action handlers 
    a click="doIt" href="#" Hello, how are you doing, #{name}? 

/condense nested content into a single line if that's how you roll 
#footer: ul.menu-items: each menu_items: li: a.menu-link href=url: link_text 

if something 
    p something was true! 
else 
    p something was false! 
関連する問題