https://github.com/deployable/node-deployable-asset
Web Asset Helpers
https://github.com/deployable/node-deployable-asset
assets css deployable express helpers js nodejs
Last synced: about 1 month ago
JSON representation
Web Asset Helpers
- Host: GitHub
- URL: https://github.com/deployable/node-deployable-asset
- Owner: deployable
- Created: 2017-01-22T00:19:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-06T23:47:39.000Z (almost 9 years ago)
- Last Synced: 2025-03-28T19:08:25.174Z (11 months ago)
- Topics: assets, css, deployable, express, helpers, js, nodejs
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Deployable Asset](https://github.com/deployable/node-deployable-asset)
## Web Asset Helpers
Helper methods for assets built with [`deployable-assets`](https://https://github.com/deployable/node-deployable-assets)
Easily reference css, js, and other assets from a build pipeline. Similar to the
way [connect-assets](https://https://github.com/adunkman/connect-assets) references
assets but without the sprockets pipeline in the app.
## Install
yarn add @deployable/asset
yarn add @deployable/assets --dev
npm install @deployable/asset --save
npm install @deployable/assets --save-dev
## Usage
The package also provides a helper class to use in your application to reference
assets. All references to your asset paths should be replaced by the helper so
assets can be served from any location, including the possibiilty of moving them
to a CDN.
```javascript
const { DeployableAsset } = require('@deployable/asset')
DeployableAsset.js('js/test.js') // =>
DeployableAsset.css('css/test.css') // =>
DeployableAsset.path('fonts/arial.woff2') // =>
```
## API
let glp = new Gulp()
## About
@deployable/asset is released under the MIT license.
Copyright 2016 Matt Hoyle - code aatt deployable.co
https://github.com/deployable/node-deployable-asset