NPM / Managed Dependencies

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-4

3. Usage

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

This will build with the light gray GEL theme:

@import "~gel-bootstrap-4/src/less/themes/gray/light/main.less";

This will build with the dark gray GEL theme:

@import "~gel-bootstrap-4/src/less/themes/gray/dark/main.less";

4. Update

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

Variables

To access only the variables (color, responsive breakpoints, etc...) used in a GEL theme, include the theme-specific variables.less file:

@import "~gel-bootstrap-4/src/less/themes/gray/light/variables.less";
Variables-only Caveat
When using only the theme's variables.less, you must also include the pre-built css file.