as commonjs
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { lstatSync, readFileSync } from 'fs';
|
||||
import { BaseUrl, FileUrl, ScriptPath, SupportUrl } from './paths';
|
||||
export default function (name) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const fs_1 = require("fs");
|
||||
const paths_1 = require("./paths");
|
||||
function default_1(name) {
|
||||
var meta = {
|
||||
name: name,
|
||||
namespace: 'zomo.dev',
|
||||
@@ -15,15 +17,15 @@ export default function (name) {
|
||||
noframes: false,
|
||||
grant: '',
|
||||
injectinto: '',
|
||||
downloadURL: FileUrl(name),
|
||||
supportURL: SupportUrl,
|
||||
homepageURL: BaseUrl,
|
||||
downloadURL: paths_1.FileUrl(name),
|
||||
supportURL: paths_1.SupportUrl,
|
||||
homepageURL: paths_1.BaseUrl,
|
||||
unwrap: false,
|
||||
};
|
||||
let metaPath = ScriptPath(name).meta;
|
||||
if (lstatSync(metaPath).isFile()) {
|
||||
let metaPath = paths_1.ScriptPath(name).meta;
|
||||
if (fs_1.lstatSync(metaPath).isFile()) {
|
||||
try {
|
||||
let args = JSON.parse(readFileSync(metaPath).toString());
|
||||
let args = JSON.parse(fs_1.readFileSync(metaPath).toString());
|
||||
let key;
|
||||
for (key in meta) {
|
||||
let val = args[key];
|
||||
@@ -86,4 +88,5 @@ ${Object.keys(meta)
|
||||
`,
|
||||
];
|
||||
}
|
||||
exports.default = default_1;
|
||||
//# sourceMappingURL=readmeta.js.map
|
||||
Reference in New Issue
Block a user