@react-native-reusables/cli 0.6.0 → 0.6.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/bin.cjs +33 -27
- package/package.json +1 -1
package/bin.cjs
CHANGED
|
@@ -56127,6 +56127,7 @@ var RequiredFilesChecker = class extends Effect_exports.Service()("RequiredFiles
|
|
|
56127
56127
|
);
|
|
56128
56128
|
missingIncludes.push({ ...include, fileName: customFileChecks.css.name });
|
|
56129
56129
|
}
|
|
56130
|
+
let stylingLibrary = "nativewind";
|
|
56130
56131
|
if (componentJson.tsx !== false) {
|
|
56131
56132
|
const missingTypeFiles = [];
|
|
56132
56133
|
const nativewindEnvContent = yield* fs2.readFileString(path8.join(options3.cwd, PROJECT_MANIFEST.nativewindEnvFile)).pipe(
|
|
@@ -56156,6 +56157,7 @@ var RequiredFilesChecker = class extends Effect_exports.Service()("RequiredFiles
|
|
|
56156
56157
|
}
|
|
56157
56158
|
}
|
|
56158
56159
|
if (uniwindTypesContent) {
|
|
56160
|
+
stylingLibrary = "uniwind";
|
|
56159
56161
|
for (const include of customFileChecks.uniwindTypes.includes) {
|
|
56160
56162
|
if (include.content.every((str) => uniwindTypesContent.includes(str))) {
|
|
56161
56163
|
yield* Effect_exports.logDebug(
|
|
@@ -56173,37 +56175,41 @@ var RequiredFilesChecker = class extends Effect_exports.Service()("RequiredFiles
|
|
|
56173
56175
|
missingFiles.push(missingTypeFiles[0], missingTypeFiles[1]);
|
|
56174
56176
|
}
|
|
56175
56177
|
}
|
|
56176
|
-
|
|
56177
|
-
|
|
56178
|
-
|
|
56179
|
-
|
|
56180
|
-
|
|
56181
|
-
|
|
56182
|
-
|
|
56183
|
-
|
|
56184
|
-
|
|
56185
|
-
|
|
56186
|
-
|
|
56187
|
-
|
|
56188
|
-
() =>
|
|
56189
|
-
|
|
56190
|
-
|
|
56191
|
-
|
|
56192
|
-
|
|
56178
|
+
if (stylingLibrary === "nativewind") {
|
|
56179
|
+
const tailwindConfigPaths = [
|
|
56180
|
+
componentJson.tailwind.config,
|
|
56181
|
+
"tailwind.config.js",
|
|
56182
|
+
"tailwind.config.ts"
|
|
56183
|
+
].filter((p3) => p3 != null);
|
|
56184
|
+
const tailwindConfigContent = yield* retryWith(
|
|
56185
|
+
(filePath) => Effect_exports.gen(function* () {
|
|
56186
|
+
const content = yield* fs2.readFileString(filePath);
|
|
56187
|
+
yield* Effect_exports.logDebug(`${symbols_exports.success} ${customFileChecks.tailwindConfig.name} found`);
|
|
56188
|
+
return content;
|
|
56189
|
+
}),
|
|
56190
|
+
tailwindConfigPaths.map((p3) => path8.join(options3.cwd, p3))
|
|
56191
|
+
).pipe(
|
|
56192
|
+
Effect_exports.catchAll(
|
|
56193
|
+
() => Effect_exports.fail(
|
|
56194
|
+
new RequiredFileError({
|
|
56195
|
+
file: "Tailwind config",
|
|
56196
|
+
message: "Tailwind config not found, Please follow the instructions at https://www.nativewind.dev/docs/getting-started/installation#installation-with-expo"
|
|
56197
|
+
})
|
|
56198
|
+
)
|
|
56193
56199
|
)
|
|
56194
|
-
)
|
|
56195
|
-
|
|
56196
|
-
|
|
56197
|
-
|
|
56200
|
+
);
|
|
56201
|
+
for (const include of customFileChecks.tailwindConfig.includes) {
|
|
56202
|
+
if (include.content.every((str) => tailwindConfigContent.includes(str))) {
|
|
56203
|
+
yield* Effect_exports.logDebug(
|
|
56204
|
+
`${symbols_exports.success} ${customFileChecks.tailwindConfig.name} has ${include.content.join(", ")}`
|
|
56205
|
+
);
|
|
56206
|
+
continue;
|
|
56207
|
+
}
|
|
56198
56208
|
yield* Effect_exports.logDebug(
|
|
56199
|
-
`${symbols_exports.
|
|
56209
|
+
`${symbols_exports.error} ${customFileChecks.tailwindConfig.name} missing ${include.content.join(", ")}`
|
|
56200
56210
|
);
|
|
56201
|
-
|
|
56211
|
+
missingIncludes.push({ ...include, fileName: customFileChecks.tailwindConfig.name });
|
|
56202
56212
|
}
|
|
56203
|
-
yield* Effect_exports.logDebug(
|
|
56204
|
-
`${symbols_exports.error} ${customFileChecks.tailwindConfig.name} missing ${include.content.join(", ")}`
|
|
56205
|
-
);
|
|
56206
|
-
missingIncludes.push({ ...include, fileName: customFileChecks.tailwindConfig.name });
|
|
56207
56213
|
}
|
|
56208
56214
|
const themeAliasPath = yield* projectConfig.resolvePathFromAlias(`${aliasForLib}/theme.ts`);
|
|
56209
56215
|
const themeContent = yield* fs2.readFileString(themeAliasPath).pipe(
|