VinceG / twitter-bootstrap-wizard

This twitter bootstrap plugin builds a wizard out of a formatter tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.
MIT License
1.39k stars 676 forks source link

'bootstrapWizard is not defined' with jspm #182

Open ValeryIvanov opened 8 years ago

ValeryIvanov commented 8 years ago

I am trying to import with jspm/systemjs this lib, but this error pops up.

This is how it looks in my js file.

import 'jquery';
import 'bootstrap';
import 'bootstrap-wizard';

This is what is added to the end of bootstrap-wizard.js and where error happens

self["bootstrapWizard"] = bootstrapWizard;

In my package.json I have jspm dependencies

"jspm": {
    "dependencies": {
        "angular": "github:angular/bower-angular@^1.5.5",
        "angular-ui-router": "github:angular-ui/angular-ui-router-bower@^0.3.0",
        "bootstrap": "github:twbs/bootstrap@^3.3.6",
        "bootstrap-wizard": "github:gwrey/bootstrap-wizard@master",
        "jquery": "npm:jquery@^2.2.4",
        "text": "github:systemjs/plugin-text@^0.0.8"
    },

In my config.js this is how it's mapped

map: {
    "bootstrap-wizard": "github:gwrey/bootstrap-wizard@master",
ValeryIvanov commented 8 years ago

By 'added' this is how bootstrap-wizard.js looks like after loaded with jspm.

1

ValeryIvanov commented 8 years ago

Tried this but did not help

  shim: {
    "bootstrap-wizard": {
      "deps": ["jquery"],
      "exports": "$"
    }
  },
ValeryIvanov commented 8 years ago

Removing

"exports bootstrapWizard";

did help, but why is this there anyway? This lib does not export anything but rather adds functionality to jquery?

And how do I make this change permenant, because removing this line helps only on my machine....