-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-app
executable file
·32 lines (25 loc) · 936 Bytes
/
create-app
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# create-app
# Run this script to generate a boilerplate app in this directory.
# Use via the following command:
# ./create-app APP_NAME
APP_NAME=$1
# Generate list of packages to install from packages_to_install.txt
ALL_PACKAGES=""
while read package || [[ -n $package ]]; do
ALL_PACKAGES="$ALL_PACKAGES $package"
echo "$package"
done <packages_to_install.txt
cd ..
echo "Initializing React Native app..."
react-native init $APP_NAME --version [email protected]
echo "Installing the following node packages via yarn..."
cd $APP_NAME
yarn add $ALL_PACKAGES -E
echo "Link relevant packages to React Native..."
react-native link
echo "Initializing git project and creating initial commit..."
git init
git add * .gitignore .babelrc .buckconfig .flowconfig .gitattributes .watchmanconfig
git commit -m "Create initial commit based on react-native-start"
echo "$APP_NAME mobile app project created at: ../$APP_NAME"