The following is a basic example of how to set up Huron in your own project.
For complete documentation on how to use Huron, visit the project repo.
-
Clone this repo
git clone https://github.com/alleyinteractive/huron-examples.git
-
Install node modules
cd huron-examples
npm install
-
Run Huron:
npm run huron
-
That's it! You should now be able to view the sample prototype in your browser at: http://localhost:8080/static/prototype/sample.html
The setup is slightly more complicated if you're developing new features for huron.
-
Clone this repo
git clone --recursive https://github.com/alleyinteractive/huron-examples.git
-
Clone the huron repo (this can be cloned anywhere)
git clone https://github.com/alleyinteractive/huron.git
-
Install relevant node modules
npm install
-
Symlink the huron repo to your global modules directory
cd huron
npm link
-
Use the now-symlinked, local copy of huron in your
huron-examples
repocd huron-examples
npm link huron
-
Any builds or updates you make in your local copy of huron will now be reflected in
node_modules/huron
within thehuron-examples
directory as well. This makes it so you won't have to publish each change, push it to git, or use thefile:
protocol in npm to develop with huron. -
Be sure to make a pull request to Huron for your feature(s) when they're ready. Follow the contributing guide in the huron repo
Troubleshooting:
- If you find the symlinked copy of huron in
huron-examples
is not updating, you may need to relink it:rm -rf node_modules/huron
npm link huron
- If you change the filename or location of the huron binary, you may need to manually remove the old one and relink huron.
rm /usr/local/bin/huron
cd huron
npm link