https://github.com/olical/bastion-example
An example project using all aspects of bastion
https://github.com/olical/bastion-example
Last synced: 11 months ago
JSON representation
An example project using all aspects of bastion
- Host: GitHub
- URL: https://github.com/olical/bastion-example
- Owner: Olical
- Created: 2016-06-11T11:38:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-14T22:12:31.000Z (over 9 years ago)
- Last Synced: 2025-01-05T02:10:43.755Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://github.com/Olical/bastion
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bastion-example
Say hello to [bastion][]! It builds JavaScript related things for you with zero configuration. Don't worry, there's a powerful configuration file, but the defaults are pretty great!
## What's this?
In this repository you'll find Elm and React code side by side with hot module reloading. That means you can change the code and it'll update live in your browser without losing the state.
The only configuration is a couple of simple lines in `bastion.conf.js`, you don't even need that if you just want a simple JavaScript application. You could still use React without this configuration file, the live reloading just wouldn't maintain state.
That configuration calls the pre-built mixins for React HMR and seamless Elm support, again with HMR. I hope to add more of these for things like CSS and image importing.
## Usage
You can compile the code into `./dist/bundle.js` with `make build`. If you have bastion installed globally you can just run `bastion`, that's all the makefile is doing.
There's also `make dev` which just maps to `bastion --dev`. This starts the dev server (at port `8080` by default) and will automatically hot reload modules as you change them.
## Want to know more?
Check out the [bastion][] repository as well as the files within this one. Especially `bastion.conf.js`, `Makefile` and `./src/entry.js`.
[bastion]: https://github.com/Olical/bastion