NPM / Managed Dependencies

Versioning

The GEL uses the Semver standard for package versioning when being used as a managed dependency.


Package Versioning

Given a version number MAJOR.MINOR.PATCH, the:

  1. MAJOR version number indicates incompatable API changes
  2. MINOR version number indicates backwards-compatible API additions
  3. MAJOR version number indicates backwards-compatible bug fixes

Package Naming

In addition, since the GEL is based on Bootstrap, the base package name will indicate which major release of Bootstrap a given GEL package is based on. i.e. gel-bootstrap-3 is based upon Bootstrap 3 and gel-bootstrap-4 will be based upon Bootstrap 4 once released.

Installation

Managed dependencies

The use of managed dependencies is preferred over using a pre-built package.

1. NPM Config

npm needs to be configured to read from the BNSF Artifactory. Place the following in .npmrc in the same folder as your project's package.json:
strict-ssl=false
registry=http://artifactory.bnsf.com:8081/artifactory/api/npm/npm-local/
cache=.npm-cache

2. Installation

Install as a managed dependency using npm:
npm install --save gel-bootstrap-3

3. Usage

To build the GEL theme within a project (with Webpack, for example) include the theme-specific main css source file:

This will build with the light gray GEL theme:

@import "~gel-bootstrap-3/src/lib/css/gray-light-gel.css";

Along with the theme-specific variables:

@import "~gel-bootstrap-3/src/less/themes/gray/light/variables.less";

4. Update

To update in a project already using managed dependencies:
npm update --save gel-bootstrap-3