()
| 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. |
no test coverage detected