jspm "map" is not remapping third party dependencies

10 views
Skip to first unread message

Brad Miller

unread,
Feb 9, 2017, 6:11:16 PM2/9/17
to jspm
Hi,
   I'd like to install jquery and jquery-ui, and ensure that jquery-ui is using the installed jquery instead of its default internal jquery dependency (@3.1.1).  This is how I've done it in the past:

package.json:
{
 
"name": "nextgen-modc",
 
"version": "0.0.1",
 
"description": "nextgen modc",
 
"private": true,
 
"dependencies": {},
 
"devDependencies": {},
 
"jspm": {
   
"map": {
       
"jquery": "github:components/jqu...@2.1.4"
      },
   
"dependencies": {
     
"jquery": "github:components/jqu...@2.1.4",
     
"jquery-ui": "github:components/jque...@1.11.4"
    },
   
"devDependencies": {
   
}
 
}
}

And a jspm install gives:

bash-3.2$ jspm install
     Looking up github:components/jqueryui
     Looking up github:components/jquery
     Updating registry cache...
     Looking up npm:jquery
ok   Installed jquery as github:components/jqu...@2.1.4 (2.1.4)
ok   Installed npm:jquery (3.1.1)
ok   Installed jquery-ui as github:components/jque...@1.11.4 (1.11.4)
ok   Install tree has no forks.
     Looking up loader files...
       system.js.map
       system.js
       system.src.js
       system-csp-production.js.map
       system-csp-production.js
       system-csp-production.src.js
       system-polyfills.js
       system-polyfills.js.map
       system-polyfills.src.js
     
     Using loader versions:
       syst...@0.19.46
ok   Loader files downloaded successfully

ok   Install complete.
bash-3.2$ 

Note that the jspm map element did not work: it is installing jqu...@3.1.1 as the jquery dependency of jquery-ui.  The generated config.js also confirms this:

System.config({
baseURL: "",
defaultJSExtensions: true,
transpiler: false,
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},

map: {
"jquery": "github:components/jqu...@2.1.4",
"jquery-ui": "github:components/jque...@1.11.4",
"github:components/jque...@1.11.4": {
"jquery": "npm:jqu...@3.1.1"
}
}
});

Of course what I want in the config.js is:
"github:components/jque...@1.11.4": {
"jquery": "github:components/jqu...@2.1.4"
},


I'm using the following: js...@0.16.52, node v6.9.4, npm 3.10.10

It is also not isolated to jquery-ui, as I'm also using 'bootstrap' that has an internal jquery dependency, and the "map" of jquery similarly fails to remap its jquery dependency.  

What is weird is that it used to work...  I did try jspm clear-cache, to no avail.  

Questions:
1. Any ideas on how to get the 'map' element to remap the third party lib "jquery" dependencies?
2. Is there a --verbose mode for jspm install that would show more of the reasoning that takes place (something to help debug)?

Thanks,
Brad



Reply all
Reply to author
Forward
0 new messages