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

ampersand-version

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-version

Transform for making it easy to include version numbers of used ampersand modules.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20K
decreased by-8.85%
Maintainers
2
Weekly downloads
 
Created
Source

ampersand-version

  • Add ampersand-version to "dependencies" in package.json
  • Add browserify transform as per below:
{
    "name": "some-ampersand-module",
    "dependencies": {
        "ampersand-version": "^1.0.1"
    },
    "browserify": {
        "transform": ["ampersand-version"]
    }
}
  • Add /*$AMPERSAND_VERSION*/ to the top of the module's main file.

why?

Now it will use a browserifiy transform to create if necessary and add it's version to the window.ampersand just for reporting purposes.

Now you can open the console on any ampersand site and see what ampersand modules it's using:

ampersand-version-demo

license

MIT

Keywords

FAQs

Package last updated on 05 Nov 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

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