hereby 1.0.0 → 1.0.1
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/README.md +4 -0
- package/dist/cli/loadHerebyfile.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# hereby
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/js/hereby)
|
|
4
|
+
[](https://github.com/jakebailey/hereby/actions/workflows/ci.yml)
|
|
5
|
+
[](https://codecov.io/gh/jakebailey/hereby)
|
|
6
|
+
|
|
3
7
|
`hereby` is a simple task runner.
|
|
4
8
|
|
|
5
9
|
# Herebyfile.mjs
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import fs from "fs/promises";
|
|
3
3
|
import path from "path";
|
|
4
|
+
import { pathToFileURL } from "url";
|
|
4
5
|
import { Task } from "../index.js";
|
|
5
6
|
import { forEachTask } from "../utils.js";
|
|
6
7
|
import { UserError } from "./utils.js";
|
|
@@ -30,7 +31,7 @@ export async function findHerebyfile(dir) {
|
|
|
30
31
|
throw new UserError("Unable to find Herebyfile.");
|
|
31
32
|
}
|
|
32
33
|
export async function loadHerebyfile(herebyfilePath) {
|
|
33
|
-
const herebyfile = await import(herebyfilePath);
|
|
34
|
+
const herebyfile = await import(pathToFileURL(herebyfilePath).toString());
|
|
34
35
|
const exportedTasks = new Set();
|
|
35
36
|
let defaultTask;
|
|
36
37
|
for (const [key, value] of Object.entries(herebyfile)) {
|