Materialize Bridge Docs
v1
v1
  • Intro
  • 1. About this application
    • 1.1 Introduction
    • 1.2 Navigation guide
    • 1.3 Components catalog
    • 1.4 Internal Structure
    • 1.5 Installation
    • 1.6 Project status
    • 1.7 Color switcher
  • 2. Installation
    • Webpack, Aurelia-CLI (Webpack)
    • JSPM
    • Aurelia-CLI (require)
    • Fuse-box 2.x
  • 3. App developers tutorial
    • 3.1 Introduction
    • 3.2 Setup
    • 3.3 Select component
    • 3.4 Button component
    • 3.5 Slider component
    • 3.6 Collapsible component
    • 3.7 What you need to know
  • 4. App developers notes
    • 4.1 On bundling
    • 4.2 Using your own SASS with JSPM
  • 5. Contributing (bridge developers notes)
    • Cloning and running the code
    • Creating samples
  • 6. About Aurelia
    • 5.1 Key Features
  • 7. About Materialize
    • 7.1 Integrated with Aurelia
    • 7.2 Why choose Materialize
Powered by GitBook
On this page
  • JSPM "forks"
  • Installing the bridge using --lock
  • Using jspm resolve
  1. 3. App developers tutorial

3.7 What you need to know

JSPM "forks"

JSPM allows for multiple versions of installed dependencies. When two dependencies import two different versions of the same library, JSPM may detect a conflict which it calls a "fork". In this case it issues a warning like this:

Installed Forks

             github:systemjs/plugin-css 0.1.20 0.1.21

This example is taken from aurelia-skeleton-navigation 1.0.0-beta.1.2.2 (after installing the bridge) which has a dependency on font-awesome@^4.5.0 - itself depending on plugin-css@0.1.20. Notice lack of the ^ indicator, meaning that JSPM will install exactly this version.

When installing the bridge you install an indirect dependency of plugin-css@0.1.21 which Dogfalo/materialize depends on.

As the version numbers in both cases are static (no ^ indicator), both versions of plugin-css are installed, leading to a fork.

There are two options to resolve this:

  • install with the --lock option

  • use jspm resolve

Installing the bridge using --lock

The --lock option keeps existing dependencies locked during a JSPM installation. So if you know the installation will introduce a fork and you want to keep the installed version of a library, use jspm install --lock aurelia-materialize-bridge.

Using jspm resolve

JSPM has a builtin command to change every used version of a dependency to the version you want. In the case above you'd issue jspm resolve --only github:systemjs/plugin-css@0.1.21. Please note that you have to give JSPM an exact package of the form registry:pkg@version.

Previous3.6 Collapsible componentNext4. App developers notes

Last updated 7 years ago