node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

roots-asset-expand

Roots Asset Expand - WIP

Build Status

Installing

npm install roots-asset-expand --save

Using

in your app.coffee file

  extensions: [assetExpand({
    lookup: "nested/*.js"
    tagName: "script"
    attributes: {
      "type": "text/javascript"
    }
  })]

in a jade file

  // assets(*.js)
  h1 hi

gives you

<script src='nested/foo.js' type='text/javascript' ></script>
<script src='nested/foo1.js' type='text/javascript' ></script>
<script src='nested/foo2.js' type='text/javascript' ></script>
<h1> hi </h1>