Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Alter bootstrap registry entry to point to npm:bootstrap #914

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

frederikschubert
Copy link
Contributor

@frederikschubert frederikschubert commented Jun 12, 2016

Follow up for this.

@guybedford
Copy link
Member

Thanks so much for following up here @frederikschubert. I guess we should ensure that the npm:bootstrap@3 package works ok with the same override as the GitHub version before setting this up though?

@frederikschubert
Copy link
Contributor Author

Yes. How could I test this?

@guybedford
Copy link
Member

I guess just copying the v3 override from the github version and testing it imports ok would be enough:

{
  "main": "dist/js/bootstrap",
  "files": null,
  "shim": {
    "dist/js/bootstrap": {
      "deps": [
        "jquery",
        "tether"
      ],
      "exports": "$"
    }
  },
  "dependencies": {
    "jquery": "*",
    "tether": "github:HubSpot/tether@^1.1.1"
  }
}

@guybedford
Copy link
Member

Perhaps add a jspmNodeConversion: false as well.

@frederikschubert
Copy link
Contributor Author

Alright! I will try to do that tomorrow.

@guybedford
Copy link
Member

Thanks so much!

@frederikschubert
Copy link
Contributor Author

I have tested it with the override you suggested. I did create a self-executing bundle and it seems to work just fine. Though I have not performed any functional testing because I have no experience with the javascript part of bootstrap.

@jakeNiemiec
Copy link

jakeNiemiec commented Jun 17, 2016

👎 jspm i npm:bootstrap does function for multiple people (https://gitter.im/jspm/jspm?at=57618d0c7a851b587e6f1d50). Even after fiddling around with the overrides, the npm version just refuses to function properly. This is impossible to learn from simply installing it.

Feel free to test things out on here: https://github.com/jakeNiemiec/jspm_bootstrap . This is a bare bones implementation (loading bootstrap onto the page).

Quote of better explanation from #916 :

@guybedford It is broken right now, [email protected] requires jquery below 3.0.0.
Using this as an example https://github.com/jakeNiemiec/jspm_bootstrap .

We are simply importing bootstrap https://github.com/jakeNiemiec/jspm_bootstrap/blob/master/src/index.js#L2
image

Desired outcome:

image

Everything loaded. Notice that jquery was properly included on the page, exported within bootstrap.

Lets try jspm i npm:[email protected]

image

Jquery no longer gets properly exported, it is loaded on the page after index.js executes (this is beyond the scope of my understanding).

Lets assume the user will try to install or include jquery to fix this according to the error jspm i jquery

image
image
😞 same error

At this point lets assume the user know that they need to override the format in the loaded jquery

image

image

This is due (in part) to "github:twbs/[email protected]" > "dependencies" > "jquery": "*",

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants