Last active
November 14, 2018 13:17
-
-
Save nielsbom/87e2e936576baea0440b4e715863f201 to your computer and use it in GitHub Desktop.
Shell script to init a Reason/ReasonML project, autocompile and autorun on change
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
# Dependencies: | |
# - Bucklescript: https://bucklescript.github.io/en/ | |
# - entr for watching file changes: http://entrproject.org/ | |
# Source this file in your bashrc (or other shell) to have the command available | |
# Set your $EDITOR environment variable to the editor of your choice. | |
# To use: $ reasonstart my-new-project | |
# This will create and start the new project on the given location. | |
function reasonstart () { | |
bsb -init $1 -theme basic-reason && | |
cd $1 && | |
$EDITOR ./src/*re && | |
find src/*re | entr sh -c 'npm run build && node src/Demo.bs.js' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment