New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

metalsmith-fingerprint

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-fingerprint

A fingerprint plugin for Metalsmith

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

metalsmith-fingerprint

Build Status

A fingerprint plugin for Metalsmith.

Installation

npm install metalsmith-fingerprint

Usage

var fingerprint = require('metalsmith-fingerprint')

Metalsmith(__dirname)
  .use(fingerprint(options))
  .build()

Options

  • match String|Array<String>

    A pattern to filter source files. Required.

Example

Say you want to fingerprint the file css/index.css:

Metalsmith(__dirname)
  .use(fingerprint({ pattern: 'css/index.css' }))
  .use(template({ engine: 'handlebars' }))
  .build()

The plugin does two things:

  1. create a duplicate of index.css with a fingerprinted filename
  2. create a fingerprint object on the Metalsmith metadata

The fingerprint object is accessible from the Handlebars template:

<link href="{{ fingerprint.[css/index.css] }}" rel="stylesheet" type="text/css" />

And the template renders the fingerprinted filename:

<link href="css/index-724af9dd72a48c18dd570790c2445fb4.css" rel="stylesheet" type="text/css" />

Tests

$ npm test

License

See LICENSE.

Keywords

FAQs

Package last updated on 09 Sep 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc