Javascript 了解jspm安装产生的config.js
我试图理解jspm安装创建的config.js文件中的以下内容。我已经听过了,但无法理解那里的描述。查看创建的文件夹和安装的包。。看起来路径和贴图选项之间存在某种关系Javascript 了解jspm安装产生的config.js,javascript,jspm,systemjs,Javascript,Jspm,Systemjs,我试图理解jspm安装创建的config.js文件中的以下内容。我已经听过了,但无法理解那里的描述。查看创建的文件夹和安装的包。。看起来路径和贴图选项之间存在某种关系 System.config({ baseURL: "/", defaultJSExtensions: true, transpiler: "typescript", paths: { "github:*": "jspm_packages/github/*", "npm:*": "jspm_packa
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: "typescript",
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
map: {
"typescript": "npm:typescript@1.6.0-dev.20150825",
"github:jspm/nodelibs-buffer@0.1.0": {
"buffer": "npm:buffer@3.4.3"
},
"github:jspm/nodelibs-os@0.1.0": {
"os-browserify": "npm:os-browserify@0.1.2"
},
"github:jspm/nodelibs-path@0.1.0": {
"path-browserify": "npm:path-browserify@0.0.0"
},
"github:jspm/nodelibs-process@0.1.1": {
"process": "npm:process@0.10.1"
},
"npm:buffer@3.4.3": {
"base64-js": "npm:base64-js@0.0.8",
"ieee754": "npm:ieee754@1.1.6",
"is-array": "npm:is-array@1.0.1"
},
"npm:os-browserify@0.1.2": {
"os": "github:jspm/nodelibs-os@0.1.0"
},
"npm:path-browserify@0.0.0": {
"process": "github:jspm/nodelibs-process@0.1.1"
},
"npm:typescript@1.6.0-dev.20150825": {
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"child_process": "github:jspm/nodelibs-child_process@0.1.0",
"fs": "github:jspm/nodelibs-fs@0.1.2",
"os": "github:jspm/nodelibs-os@0.1.0",
"path": "github:jspm/nodelibs-path@0.1.0",
"process": "github:jspm/nodelibs-process@0.1.1",
"readline": "github:jspm/nodelibs-readline@0.1.0"
}
}
});
有人能帮我理解配置吗?请容忍我。。我是一个试图理解javascript生态系统的初学者
谢谢 这是个老问题,但如果有人闯入这里,我还是会回答的 假设脚本在
map
中运行到该定义中:
github:jspm/nodelibs-buffer@0.1.0
解析器将检查github:
路径中的entry
并将其替换为jspm\u packages/github/*
中的值(如regex),结果是:
jspm_包/github/jspm/nodelibs-buffer@0.1.0
加载文件等时,System.js将能够找到包含此信息的脚本的安装位置。这是一个老问题,但如果其他人遇到此问题,我将回答 假设脚本在
map
中运行到该定义中:
github:jspm/nodelibs-buffer@0.1.0
解析器将检查github:
路径中的entry
并将其替换为jspm\u packages/github/*
中的值(如regex),结果是:
jspm_包/github/jspm/nodelibs-buffer@0.1.0
加载文件等时,System.js将能够找到包含此信息的脚本的安装位置