@boon4681/giri 0.0.2-alpha-8 → 0.0.3
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/cli.js +136 -58
- package/dist/cli.js.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2236,27 +2236,33 @@ async function syncProject(config, options = {}) {
|
|
|
2236
2236
|
}
|
|
2237
2237
|
|
|
2238
2238
|
// src/generator/watch.ts
|
|
2239
|
+
var import_node_fs9 = require("fs");
|
|
2240
|
+
var import_node_path14 = require("path");
|
|
2241
|
+
|
|
2242
|
+
// src/loader/import-graph.ts
|
|
2239
2243
|
var import_node_fs8 = require("fs");
|
|
2240
|
-
var
|
|
2244
|
+
var import_node_path12 = require("path");
|
|
2245
|
+
var import_typescript5 = __toESM(require("typescript"));
|
|
2246
|
+
var import_tinyglobby2 = require("tinyglobby");
|
|
2241
2247
|
|
|
2242
2248
|
// src/loader/module-loader.ts
|
|
2243
|
-
var
|
|
2249
|
+
var import_node_path13 = require("path");
|
|
2244
2250
|
|
|
2245
2251
|
// src/lifecycle.ts
|
|
2246
|
-
var
|
|
2247
|
-
var
|
|
2252
|
+
var import_node_fs10 = require("fs");
|
|
2253
|
+
var import_node_path15 = require("path");
|
|
2248
2254
|
var MAIN_EXTENSIONS2 = ["ts", "tsx", "mts", "cts", "js", "jsx", "mjs", "cjs"];
|
|
2249
2255
|
function resolveMainFile(cwd) {
|
|
2250
2256
|
for (const ext of MAIN_EXTENSIONS2) {
|
|
2251
|
-
const file = (0,
|
|
2252
|
-
if ((0,
|
|
2257
|
+
const file = (0, import_node_path15.join)(cwd, "src", `main.${ext}`);
|
|
2258
|
+
if ((0, import_node_fs10.existsSync)(file)) {
|
|
2253
2259
|
return file;
|
|
2254
2260
|
}
|
|
2255
2261
|
}
|
|
2256
2262
|
return void 0;
|
|
2257
2263
|
}
|
|
2258
2264
|
async function loadLifecycle(cwd = process.cwd()) {
|
|
2259
|
-
const file = resolveMainFile((0,
|
|
2265
|
+
const file = resolveMainFile((0, import_node_path15.resolve)(cwd));
|
|
2260
2266
|
if (!file) {
|
|
2261
2267
|
return {};
|
|
2262
2268
|
}
|