Skip to content

tomoyukikashiro/fly-useref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

useref plugin for Fly.

npm package

Usage

Check out the documentation to see the available options.

Install

npm install -D fly-useref

Example

Check Flyfile.js and test directory :)

yield this.clear("test/index.html")
yield this
  .source("test/src/index.html")
  .useref()
  .target("test")

before

<html>
<head>
  <!-- build:css css/combined.css -->
  <link href="css/one.css" rel="stylesheet">
  <link href="css/two.css" rel="stylesheet">
  <!-- endbuild -->
</head>
<body>
  <!-- build:js scripts/combined.js -->
  <script type="text/javascript" src="scripts/one.js"></script>
  <script type="text/javascript" src="scripts/two.js"></script>
  <!-- endbuild -->

  <!-- build:js scripts/async.js async data-foo="bar" -->
  <script type="text/javascript" src="scripts/three.js"></script>
  <script type="text/javascript" src="scripts/four.js"></script>
  <!-- endbuild -->
</body>
</html>

after

<html>
<head>
  <link rel="stylesheet" href="css/combined.css">
</head>
<body>
  <script src="scripts/combined.js"></script>

  <script src="scripts/async.js" async data-foo="bar"></script>
</body>
</html>

License

MIT © Tomoyuki Kashiro et al