Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,22 @@ export default async function generateExampleApp({
const directory = path.join(dest, 'example');
const args =
type === 'native'
? // `npx react-native init <projectName> --directory example --skip-install`
? // `npx --package react-native-test-app@latest init --name ${projectName}Example --destination example --version ${reactNativeVersion}`
[
'react-native@latest',
'--package',
`react-native-test-app@latest`,
'init',
'--name',
`${projectName}Example`,
'--directory',
`--destination`,
directory,
'--version',
reactNativeVersion,
'--skip-install',
'--npm',
...(reactNativeVersion !== 'latest'
? ['--version', reactNativeVersion]
: []),
'--platform',
'ios',
'--platform',
'android',
]
: // `npx create-expo-app example --no-install --template blank`
[
Expand All @@ -87,7 +92,6 @@ export default async function generateExampleApp({
];

await spawn('npx', args, {
cwd: dest,
env: { ...process.env, npm_config_yes: 'true' },
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
const path = require('path');
const pak = require('../package.json');
const { configureProjects } = require('react-native-test-app');

module.exports = {
project: configureProjects({
android: {
sourceDir: 'android',
},
ios: {
sourceDir: 'ios',
},
}),
dependencies: {
[pak.name]: {
root: path.join(__dirname, '..'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
const path = require('path');
const pak = require('../package.json');
const { configureProjects } = require('react-native-test-app');

module.exports = {
project: configureProjects({
android: {
sourceDir: 'android',
},
ios: {
sourceDir: 'ios',
},
}),
dependencies: {
[pak.name]: {
root: path.join(__dirname, '..'),
Expand Down