Commits (4)
{
"name": "mfgames-writing-format",
"version": "0.10.4",
"version": "0.10.5",
"description": "A command-line framework for formatting books into a variety of formats.",
"repository": {
"type": "git",
"url": "git+https://gitlab.com/mfgames-writing-js/mfgames-writing-format-js.git"
"url": "git+https://gitlab.com/mfgames-writing/mfgames-writing-format-js.git"
},
"keywords": [
"ebook",
......@@ -21,9 +21,9 @@
},
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/mfgames-writing-js/mfgames-writing-format-js/issues"
"url": "https://gitlab.com/mfgames-writing/mfgames-writing-format-js/issues"
},
"homepage": "https://gitlab.com/mfgames-writing-js/mfgames-writing-format-js#README",
"homepage": "https://gitlab.com/mfgames-writing/mfgames-writing-format-js#README",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"bin": {
......
......@@ -103,6 +103,7 @@ function chooseEditions(args: PublicationArgs): Promise<PublicationArgs> {
edition = mergeObjects(edition, getDefaults());
edition.rootDirectory = args.rootDirectory;
edition.publicationFile = args.publicationFile;
edition.editionName = editionName;
// Create a promise to handle this one.
let editionArgs = new EditionArgs(args, editionName, edition);
......
......@@ -2,8 +2,15 @@ import {EditionArgs} from "mfgames-writing-contracts";
import * as fs from "fs";
import * as path from "path";
var loaded = {};
export function loadModule(args: EditionArgs, name: string): any {
// Report what we're doing.
// Report what we're doing. We want to avoid doing this a lot, so we only
// show the message once.
if (loaded[name]) {
return loaded[name];
}
args.logger.debug(`Loading module: ${name}`);
// If the module starts with a "./" or a "/", then we first treat it as a
......@@ -34,6 +41,7 @@ export function loadModule(args: EditionArgs, name: string): any {
}
// Return the resulting module.
loaded[name] = mod;
return mod;
}
......@@ -44,7 +52,6 @@ function loadModulePath(args: EditionArgs, modulePath: string): any {
args.logger.debug(`Loaded ${modulePath}`);
return results.default;
} catch (exception) {
args.logger.debug(`Missing ${modulePath}`);
return null;
}
}