eleventy-test 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ScenarioOutput from "./ScenarioOutput";
|
|
2
2
|
export * from "./eleventyUtils";
|
|
3
|
-
export declare function buildScenarios(projectRoot: string, returnArray?: true): Promise<ScenarioOutput[]>;
|
|
4
|
-
export declare function buildScenarios(projectRoot: string, returnArray?: false): Promise<{
|
|
3
|
+
export declare function buildScenarios(projectRoot: string, returnArray?: true, scenariosDir?: string, globalInputDir?: string): Promise<ScenarioOutput[]>;
|
|
4
|
+
export declare function buildScenarios(projectRoot: string, returnArray?: false, scenariosDir?: string, globalInputDir?: string): Promise<{
|
|
5
5
|
[key: string]: ScenarioOutput;
|
|
6
6
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -148,13 +148,10 @@ async function buildEleventy({
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// src/index.ts
|
|
151
|
-
|
|
152
|
-
var DIR_SCENARIOS = (0, import_path3.join)(DIR_BASE, "scenarios");
|
|
153
|
-
var DIR_INPUT = (0, import_path3.join)(DIR_BASE, "input");
|
|
154
|
-
async function buildScenarios(projectRoot = (0, import_process2.cwd)(), returnArray = true) {
|
|
151
|
+
async function buildScenarios(projectRoot = (0, import_process2.cwd)(), returnArray = true, scenariosDir = "tests/scenarios/", globalInputDir = "tests/input") {
|
|
155
152
|
return new Promise(async (resolve, reject) => {
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
scenariosDir = (0, import_path3.join)(projectRoot, scenariosDir);
|
|
154
|
+
globalInputDir = (0, import_fs3.existsSync)((0, import_path3.join)(projectRoot, globalInputDir)) ? (0, import_path3.join)(projectRoot, globalInputDir) : "undefined";
|
|
158
155
|
const scenarioDirs = (0, import_fs3.readdirSync)(scenariosDir);
|
|
159
156
|
const scenarioOutputs = [];
|
|
160
157
|
for (let i = 0; i < scenarioDirs.length; i++) {
|