This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function escapeString(string) { | |
string = string.replace(/\\/g, "\\\\"). | |
replace(/\n/g, "\\n"). | |
replace(/\r/g, "\\r"). | |
replace(/\t/g, "\\t"); | |
if (string.indexOf("'") < 0) { | |
return "'" + string + "'"; | |
} | |
string = string.replace(/"/g, "\\\""); | |
return '"' + string + '"'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Create a RN project which includes react-native-web | |
# Takes one argument, the target directory (and app) name, | |
if [ $# -ne 1 ] | |
then | |
echo "usage: $0 <target-dir>" | |
exit 1 | |
fi |