35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
function getAllPaths({ baseUrl, supportUrl, homepageUrl, remoteBranch, inBase, outBase, }) {
|
|
// generate links for remote git server
|
|
if (baseUrl != '' && remoteBranch != '') {
|
|
if (supportUrl == '') {
|
|
supportUrl = `${baseUrl}/issues`;
|
|
}
|
|
if (homepageUrl == '') {
|
|
homepageUrl = baseUrl;
|
|
}
|
|
baseUrl = `${baseUrl}/raw/branch/${remoteBranch}/${outBase}`;
|
|
}
|
|
return {
|
|
base: {
|
|
in: inBase,
|
|
out: outBase,
|
|
},
|
|
url: {
|
|
home: homepageUrl,
|
|
base: baseUrl,
|
|
support: supportUrl,
|
|
},
|
|
script: (name) => ({
|
|
dir: `${inBase}/${name}`,
|
|
main: `${inBase}/${name}/main.ts`,
|
|
meta: `${inBase}/${name}/meta.json`,
|
|
error: `${inBase}/${name}/error.log`,
|
|
dist: `${outBase}/${name}.user.js`,
|
|
url: `${baseUrl}/${name}.user.js`,
|
|
}),
|
|
};
|
|
}
|
|
exports.default = getAllPaths;
|
|
//# sourceMappingURL=paths.js.map
|