Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

handlebars-helper-asset

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-helper-asset

Handlebars helper for generating a relative path from the current file to the specified asset (CSS, JavaScript, image, icon etc.).

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

{{asset}} NPM version

Handlebars helper for generating a assetative link from the current page to the specified page.

Installation

Install with npm

npm i handlebars-helper-asset --save-dev

Install with bower

bower install handlebars-helper-asset --save-dev

Register the helper

The easiest way to register the helper with Assemble is to add the module to devDependencies and keywords in your project's package.json:

{
  "devDependencies": {
    "handlebars-helper-asset": "*"
  },
  "keywords": [
    "handlebars-helper-asset"
  ]
}

Alternatively, to register the helper explicitly in the Gruntfile:

grunt.initConfig({
  assemble: {
    options: {
      // the 'handlebars-helper-asset' npm module must also be listed in
      // devDependencies for assemble to automatically resolve the helper
      helpers: ['handlebars-helper-asset', 'foo/*.js']
    },
    files: {
      'dist/': ['src/templates/*.hbs']
    }
  }
});

Usage

With the helper registered, you may now begin using it in your templates:

<link rel="stylesheet" href="{{asset 'css/styles.css'}}">

Author

Jon Schlinkert

Copyright (c) 2014 Jon Schlinkert, contributors. Licensed under the MIT License

Keywords

assemble

FAQs

Package last updated on 25 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts