ampersand-version

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

MIT 2 个版本
安装
npm install ampersand-version
yarn add ampersand-version
pnpm add ampersand-version
bun add ampersand-version
README

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

版本列表
1.0.2 2014-11-05
1.0.1 2014-10-22