asajs 4.0.3-preview → 4.0.4-preview
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.
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { createRequire } from "module";
|
|
4
|
+
if (!fs.existsSync("asajs.config.js")) {
|
|
5
|
+
fs.copyFileSync("node_modules/asajs/resources/asajs.config.js", "asajs.config.js");
|
|
5
6
|
}
|
|
6
7
|
if (!fs.existsSync(".gitignore")) {
|
|
7
8
|
fs.writeFileSync(".gitignore", `node_modules`, "utf-8");
|
|
8
9
|
}
|
|
9
|
-
export const config =
|
|
10
|
+
export const config = createRequire(import.meta.url)(path.resolve(process.cwd(), "asajs.config.js")).config;
|
|
10
11
|
export let isBuildMode = config.compiler?.enabled ?? false;
|
|
11
12
|
export let isLinkMode = config.compiler?.autoImport ?? false;
|
|
12
13
|
export let unLinked = !(config.compiler?.autoImport ?? true);
|
package/package.json
CHANGED
|
File without changes
|