Socket
Socket
Sign inDemoInstall

@constgen/neutrino-revision

Package Overview
Dependencies
317
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @constgen/neutrino-revision

Neutrino middleware for versioning of the application based on the Git revision


Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Install size
359 kB
Created
Weekly downloads
 

Readme

Source

@constgen/neutrino-revision

npm npm

Neutrino middleware that exposes Git revision information through environment variables

Features

  • Git revision information through environment variables: VERSION, COMMITHASH, BRANCH
  • Correctly handle CI/CD environments
  • Create files in the output with the revision information
  • Fallback VERSION to package.json "version" in non-Git environment

Requirements

  • Node.js v10+
  • Neutrino v9
  • Webpack v4

Installation

@constgen/neutrino-revision can be installed from NPM. You should install it to "dependencies" (--save) or "devDependncies" (--save-dev) depending on your goal.

npm install --save @constgen/neutrino-revision

Usage

In preset

Require this package and plug it into Neutrino. The middleware has no options:

let revision = require('@constgen/neutrino-revision')

neutrino.use(revision())

In neutrinorc

The middleware also may be used together with another presets in Neutrino rc-file, e.g.:

.neutrinorc.js

let revision = require('@constgen/neutrino-revision')

module.exports = {
   use: [
      revision()
   ]
}

Keywords

FAQs

Last updated on 28 Sep 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc