MCPcopy Index your code
hub / github.com/brody2consult/create-react-native-module / generateLibraryModule

Function generateLibraryModule

lib/lib.js:150–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 info('CREATE: Generating the React Native library module');
149
150 const generateLibraryModule = () => {
151 return fs.ensureDir(packageName).then(() => {
152 return Promise.all(templates.filter((template) => {
153 if (template.platform) {
154 return (platforms.indexOf(template.platform) >= 0);
155 }
156
157 return true;
158 }).map((template) => {
159 const templateArgs = {
160 packageName,
161 objectClassName,
162 nativePackageId,
163 // namespace - library API member removed since Windows platform
164 // is now removed (may be added back someday in the future)
165 // namespace,
166 platforms,
167 tvosEnabled,
168 githubAccount,
169 authorName,
170 authorEmail,
171 license,
172 isView,
173 useAppleNetworking,
174 };
175
176 return renderTemplateIfValid(fs, packageName, template, templateArgs);
177 }));
178 });
179 };
180
181 // This separate promise makes it easier to generate
182 // multiple test or sample apps in the future.

Callers 1

Calls 1

renderTemplateIfValidFunction · 0.85

Tested by

no test coverage detected