Created
March 24, 2017 18:40
-
-
Save rafaelrinaldi/8e3485e7dbf116bf8ba1512a4253fc88 to your computer and use it in GitHub Desktop.
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
# This script will take care of react-specific imports just so | |
# Preact can do its job (production only) | |
modules=./node_modules | |
bin=$modules/.bin | |
replace=$bin/replace | |
pattern="require\('react\/lib\/ReactDOMFactories'\)" | |
target=$modules/remarkable-react/lib/lib/renderer.js | |
if [ ! -d "$modules" ]; then | |
echo 'No dependencies found. Run `yarn` or `npm i`.' | |
exit | |
fi | |
echo 'Replacing strings...' | |
$replace $pattern '{}' $target | |
echo 'Done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment