Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adam-lynch/link-assets
Spits out a file containing HTML links/scripts for each of the assets given
https://github.com/adam-lynch/link-assets
Last synced: about 1 month ago
JSON representation
Spits out a file containing HTML links/scripts for each of the assets given
- Host: GitHub
- URL: https://github.com/adam-lynch/link-assets
- Owner: adam-lynch
- Created: 2014-02-05T00:02:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-17T21:55:56.000Z (about 10 years ago)
- Last Synced: 2024-11-20T01:29:42.744Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 336 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
link-assets
==========[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Windows Build Status][appveyor-image]][appveyor-url] [![Dependency Status][depstat-image]][depstat-url]
---
## Installation
```javascript
npm install link-assets
```## Example usage with [Gulp](http://github.com/gulpjs/gulp)
```js
var gulp = require('gulp');
var linkAssets = require('./');gulp.task('include', function () {
gulp.src('./css/*.css')
.pipe(linkAssets('styles.html'))
.pipe(gulp.dest('./includes/'));
});gulp.task('default', ['include']);
```## linkAssets(fileName, options)
PropertyDefaultDescription
bustCachefalseA time-based query string will be appended
docRootNonePath to document root so only relative paths to assets are written out. If none is passed, just the filenames are output.
lineBreaksfalseSplits asset references onto separate lines
selfCloseEmptyElementsfalsePuts closing slash on empty elements
### Notes
- Forward slashes are always used no matter which platform.[npm-url]: https://npmjs.org/package/link-assets
[npm-image]: http://img.shields.io/npm/v/link-assets.svg?style=flat[travis-url]: http://travis-ci.org/adam-lynch/link-assets
[travis-image]: http://img.shields.io/travis/adam-lynch/link-assets.svg?style=flat[appveyor-url]: https://ci.appveyor.com/project/adam-lynch/link-assets/branch/master
[appveyor-image]: https://ci.appveyor.com/api/projects/status/0pqag2cjjqa5h23w/branch/master?svg=true[depstat-url]: https://david-dm.org/adam-lynch/link-assets
[depstat-image]: https://david-dm.org/adam-lynch/link-assets.svg?style=flat