返回多个文件的拼接结果 #234
xcodebuild
started this conversation in
Show and tell
返回多个文件的拼接结果
#234
Replies: 1 comment
-
多个文件的拼接目前可以通过 node 脚本实现: 需要先 s.alicdn.com/@g/??mui/universal-env/0.6.7/index.js,mui/ali-universal-asyncstorage/1.0.7/index.js,code/npm/@ali/ncom-speedy2-redfox/6.4.1/index.js,rax-pkg/rax/1.1.2/index.js,code/npm/@ali/ncom-mcms_ocms-component_component/5.0.11/index.js,rax-pkg/universal-env/2.0.0/index.js,rax-pkg/rax-image/1.1.0/index.js,code/npm/@ali/ncom-media-transfer/5.0.11/index.js,code/npm/@ali/ncom-speedy2-image/6.0.8/index.js,rax-pkg/rax-view/1.0.1/index.js,rax-pkg/rax-text/1.2.1/index.js,code/npm/@ali/ncom-speedy3-tab/1.0.12/index.js,code/npm/@ali/ncom-individual-nav-log/6.0.1/index.js,code/npm/@ali/ncom-hugo-dot/6.0.6/index.js,code/npm/@ali/ncom-speedy2-touchable/6.0.1/index.js,code/npm/@ali/ncom-speedy2-navbar/6.0.10/index.js,code/npm/@ali/ncom-panama2-filtman-function/6.0.11/index.js,code/npm/@ali/ncom-hugo2-m-pagex/1.1.8/index.js,code/npm/@ali/ncom-hugo2-fdl-merge/1.0.5/index.js,rax-pkg/style-unit/2.0.5/index.js,rax-pkg/universal-transition/1.0.5/index.js,code/npm/@ali/ncom-hugo-m-video/6.1.2/index.js,code/npm/@ali/ncom-hugo-m-entry-live1x1-vertical-col1/6.0.2/index.js,code/npm/@ali/ncom-rpx-cal/6.0.2/index.js,code/npm/@ali/ncom-speedy2-icons/6.0.10/index.js,rax-pkg/rax-find-dom-node/1.0.0/index.js,rax-pkg/rax-refreshcontrol/1.0.0/index.js,rax-pkg/rax-scrollview/1.0.0/index.js,rax-pkg/rax-children/1.0.0/index.js,rax-pkg/rax-proptypes/1.0.0/index.js,rax-pkg/rax-recyclerview/1.1.2/index.js,code/npm/@ali/ncom-hugo-m-dot-element/6.0.16/index.js,code/npm/@ali/ncom-panama2-supplier-elements/6.0.23/index.js,code/npm/@ali/ncom-hugo-m-Live-broadcast-elements/6.0.26/index.js,code/npm/@ali/ncom-hugo-m-entry-live1x1-horizontal-col1/6.0.12/index.js,code/npm/@ali/alimod-m-live/6.0.25/index.js scriptfile://`
const fs = require('fs');
const fetch = require('/usr/local/lib/node_modules/node-fetch/lib/index');
exports.handleRequest = async (ctx, next) => {
const url1 = 'https://s.alicdn.com/@g/??mui/universal-env/0.6.7/index.js,mui/ali-universal-asyncstorage/1.0.7/index.js,rax-pkg/rax/1.1.2/index.js,code/npm/@ali/ncom-mcms_ocms-component_component/5.0.11/index.js,rax-pkg/universal-env/2.0.0/index.js,rax-pkg/rax-image/1.1.0/index.js,code/npm/@ali/ncom-media-transfer/5.0.11/index.js,code/npm/@ali/ncom-speedy2-image/6.0.8/index.js,rax-pkg/rax-view/1.0.1/index.js,rax-pkg/rax-text/1.2.1/index.js,code/npm/@ali/ncom-speedy3-tab/1.0.12/index.js,code/npm/@ali/ncom-individual-nav-log/6.0.1/index.js,code/npm/@ali/ncom-hugo-dot/6.0.6/index.js,code/npm/@ali/ncom-speedy2-touchable/6.0.1/index.js,code/npm/@ali/ncom-speedy2-navbar/6.0.10/index.js,code/npm/@ali/ncom-panama2-filtman-function/6.0.11/index.js,code/npm/@ali/ncom-hugo2-m-pagex/1.1.8/index.js,code/npm/@ali/ncom-hugo2-fdl-merge/1.0.5/index.js,rax-pkg/style-unit/2.0.5/index.js,rax-pkg/universal-transition/1.0.5/index.js,code/npm/@ali/ncom-hugo-m-video/6.1.2/index.js,code/npm/@ali/ncom-hugo-m-entry-live1x1-vertical-col1/6.0.2/index.js,code/npm/@ali/ncom-rpx-cal/6.0.2/index.js,code/npm/@ali/ncom-speedy2-icons/6.0.10/index.js,rax-pkg/rax-find-dom-node/1.0.0/index.js,rax-pkg/rax-refreshcontrol/1.0.0/index.js,rax-pkg/rax-scrollview/1.0.0/index.js,rax-pkg/rax-children/1.0.0/index.js,rax-pkg/rax-proptypes/1.0.0/index.js,rax-pkg/rax-recyclerview/1.1.2/index.js,code/npm/@ali/ncom-hugo-m-dot-element/6.0.16/index.js,code/npm/@ali/ncom-panama2-supplier-elements/6.0.23/index.js,code/npm/@ali/ncom-hugo-m-Live-broadcast-elements/6.0.26/index.js,code/npm/@ali/ncom-hugo-m-entry-live1x1-horizontal-col1/6.0.12/index.js,code/npm/@ali/alimod-m-live/6.0.25/index.js';
const url2 = 'http://localhost:8001/speedy2-redfox/index.js';
// const url2 = 'https://dev.g.alicdn.com/code/npm/@ali/ncom-speedy2-redfox/6.4.0/index.js';
const urlList = [url1, url2];
const depRes = Promise.all(urlList.map(item => {
return fetch(item).then(res => res.text());
}));
const depCode = (await depRes).join(';');
ctx.body = depCode;
};
`
# https://s.alicdn.com/@g/code/npm/@ali/ncom-ncms-rax-bootstrap/6.1.0/??index.js http://30.37.69.25:3333/ncom/ncms-rax-bootstrap/index.js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
仅限两个文件有效,更多文件要复杂一些:
Beta Was this translation helpful? Give feedback.
All reactions