@joystick.js/cli-canary 0.0.0-canary.89 → 0.0.0-canary.90
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,7 +1,7 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import generateId from "./generateId.js";
|
|
3
3
|
var setComponentId_default = (file = "") => {
|
|
4
|
-
const componentMapPath = process.env.NODE_ENV
|
|
4
|
+
const componentMapPath = ["development", "test"].includes(process.env.NODE_ENV) ? `./.joystick/build/componentMap.json` : `./.build/componentMap.json`;
|
|
5
5
|
const componentMapExists = fs.existsSync(componentMapPath);
|
|
6
6
|
const componentMap = componentMapExists ? JSON.parse(fs.readFileSync(componentMapPath, "utf-8")) : {};
|
|
7
7
|
const parts = [...file?.matchAll(/\/\/ ui+.*/gi)]?.map((match) => {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import generateId from "./generateId.js";
|
|
|
3
3
|
|
|
4
4
|
export default (file = "") => {
|
|
5
5
|
const componentMapPath =
|
|
6
|
-
process.env.NODE_ENV
|
|
6
|
+
['development', 'test'].includes(process.env.NODE_ENV)
|
|
7
7
|
? `./.joystick/build/componentMap.json`
|
|
8
8
|
: `./.build/componentMap.json`;
|
|
9
9
|
const componentMapExists = fs.existsSync(componentMapPath);
|