| 9 | const createLibraryModule = require('./lib'); |
| 10 | |
| 11 | const postCreateInstructions = ({ |
| 12 | packageName, |
| 13 | platforms, |
| 14 | generateExample, |
| 15 | exampleName |
| 16 | }) => ` |
| 17 | ==================================================== |
| 18 | YOU'RE ALL SET! |
| 19 | ` + (generateExample |
| 20 | ? ` |
| 21 | ${emoji.get('bulb')} check out the example app in ${packageName}/${exampleName} |
| 22 | ${emoji.get('bulb')} recommended: run Metro Bundler in a new shell |
| 23 | ${logSymbols.info} (cd ${packageName}/${exampleName} && yarn start) |
| 24 | ${emoji.get('bulb')} enter the following commands to run the example app: |
| 25 | ${logSymbols.info} cd ${packageName}/${exampleName} |
| 26 | ${platforms.split(',').map(platform => |
| 27 | `${logSymbols.info} yarn ${platform} # for React Native 0.60: npx react-native run-${platform}` |
| 28 | ).join(` |
| 29 | `)} |
| 30 | ${logSymbols.warning} IMPORTANT NOTICES |
| 31 | ${logSymbols.warning} After clean checkout, these first steps are needed: |
| 32 | ${logSymbols.info} run Yarn in ${packageName}/${exampleName}/ios |
| 33 | ${logSymbols.info} (cd ${packageName}/${exampleName} && yarn) |
| 34 | ${logSymbols.info} do \`pod install\` for iOS in ${packageName}/${exampleName}/ios |
| 35 | ${logSymbols.info} cd ${packageName}/${exampleName} |
| 36 | ${logSymbols.info} (cd ios && pod install) |
| 37 | ${logSymbols.warning} KNOWN ISSUE with adding dependencies to the library root |
| 38 | ${logSymbols.info} see https://github.com/brodybits/create-react-native-module/issues/308 |
| 39 | ` |
| 40 | : ` |
| 41 | ${emoji.get('bulb')} next time consider using \`--generate-example\` to add a generated example! |
| 42 | `); |
| 43 | |
| 44 | module.exports = { |
| 45 | name: 'create-library', |