Jeremy Danyow
Jeremy Danyow

Reputation: 26406

Install bootstrap v4-dev branch using jspm

Is it possible to install the bootstrap v4-dev branch using jspm?

I've tried:

jspm install github:twbs/bootstrap@v4-dev

This kind of works, but the dist folder is empty.

I'm not sure if jspm supports installing branches in this manner. The docs say:

Any version tag or branch can be installed this way for GitHub and npm. Commit-based installs are not supported for the GitHub registry currently.

https://github.com/jspm/jspm-cli/wiki/Installing-Packages


Edit

Tried:

jspm install github:twbs/[email protected]

Same result- empty dist\css and dist\js folders.

folders

Upvotes: 2

Views: 1962

Answers (1)

Micah Zoltu
Micah Zoltu

Reputation: 7432

jspm install github:twbs/[email protected]

You can install from any tag, you just have to use the name of the tag (minus the v in front): https://github.com/twbs/bootstrap/releases

I believe that in order to get the whole @3.5.0 thing to work the v in tags is stripped by JSPM when querying for available versions. This means if you try to install v4.0.0-alpha you will get an error saying it isn't found.

On top of that, you will need an override since it would appear that JSPM can't figure it all out (it uses the package.json by default I believe). You can see the override for 3.3.4 here: https://github.com/jspm/registry/blob/master/package-overrides/github/twbs/bootstrap%403.3.4.json

If you are lucky, you can just copy that override. If there are significant changes to the project structure in 4.0 then you will have to tweak the override a little. You can do local overrides by following the instructions here https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm#testing-configuration. Coincidentally, bootstrap is what they use in the example.

Once you have it figured out, you can submit a PR to the JSPM Registry so others can benefit from your work.

Upvotes: 4

Related Questions