Sunrise is a small bundle that allows to write a dedicated single page, frontend application. It was inspired by the short timings in hackathons and same-day release deadlines. It includes several libraries to help you move, like Twitter Bootstrap, LESS CSS, a small web server, and a simple JS framework. Sunrise's intention is to get you off the ground so there's little to learn.
You can do two things, you can either clone the repository. Or you can you can download a copy.
git clone email@example.com:sjlu/sunrise.git cd sunrise git submodule init git submodule update
When you're finished with that, you'll need to have node.js installed. Run the following command to install the dependencies.
That's it, it's on to learn how to use Sunrise now.
There are only a couple files and folders you'll need to recognize. It's not as bad as it looks.
assets/less: This folder contains your LESS CSS styles. When you add a new LESS file, you'll need to include it in base.less.
$(document).ready()function. You'll need to declare your models in here, such as the frontpage.js file.
index.html: Anything requiring your HTML document goes here. You can create new HTML files in this root directory, but it is not recommended since the purpose is a "single-page" application. You'll also notice two commented lines here, these are the minified files. It is recommended that you comment/uncomment the appropriate lines when you're developing and running in a live environment.
Not done yet! You need to compile all your JS and LESS files together. You'll also need to run a simple server. By default, the server will run and listen to
To start it up, all you need to do is run:
Note that it'll fork a process in. Anytime you change a file, it'll automatically compile your JS and LESS files and snapshot it into the
public/ directory. You do not need to touch this directory ever.
If you need help using this, feel free to submit an issue. If you encounter something that's intuitive, please help revise this document.