React SDK (#462)

This commit is contained in:
Zai Shi
2025-02-27 01:55:45 +01:00
committed by GitHub
parent e63d41408d
commit da1b95ec3b
42 changed files with 2202 additions and 575 deletions
+16 -1
View File
@@ -5,7 +5,7 @@ import path from "path";
const COMMENT_LINE = "THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY";
const allEnvs = ["next", "react-like", "js", "template"];
const allEnvs = ["next", "react", "react-like", "js", "template"];
const ignoredFiles = ['node_modules', 'dist', '.turbo', '.gitignore'];
const baseDir = path.resolve(__dirname, "..", "packages");
@@ -506,3 +506,18 @@ generateFromTemplate({
return content;
},
});
generateFromTemplate({
src: srcDir,
dest: path.resolve(baseDir, "react"),
editFn: (path, content) => {
// ignore the generated folder as the files are big and not needed
if (path.startsWith('src/generated')) {
return null;
}
content = processMacros(content, ["react", "react-like"]);
return content;
},
});