Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

manifester

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

manifester

A fingerprint manifest reader.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
406
increased by4.1%
Maintainers
1
Weekly downloads
 
Created
Source

Manifester

A fingerprint manifest reader.

Reads a JSON manifest (generated by e.g. https://github.com/sindresorhus/gulp-rev/) and returns a function you can use in your views to reference the fingerprinted file path while in development and production.

Installation

$ npm install manifester

Example

var assetPath = require('manifester')('./path/to/manifest.json', {localPath: '/assets'});

assetPath('test.js') // => '/assets/test.js'

var prodAssetPath = require('manifester')('./path/to/manifest.json', {cdnUrl: 'https://d3.cloudfront.net/assets', env: 'production'});

prodAssetPath('test.js') // => 'https://d3.cloudfront.net/assets/test-c27904c624.js'

Usage

var assetPath = require('manifester')('./path/to/manifest.json', {
  env: 'string', // defaults to process.env.NODE_ENV and falls back to 'development'
  localPath: 'string', // defaults to /, used only in development
  cdnUrl: 'string' // no default. falls back to localPath if not provided.
});

License

MIT

Keywords

FAQs

Package last updated on 29 Jan 2017

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