Skip to content

Scaffolded Project Usage & Workflow

Tze-chiu Lei edited this page Mar 5, 2015 · 3 revisions

##Virtual Hosts

Set up two virtual hosts, one for development and one for testing builds:

  • Development vhost -- make /src the site root.
  • Build vhost -- make /build the site root.

If you don't have a local webserver, the one I have is WAMP for Windows. My Mac-user colleagues generally use XAMPP.

##Adding sources

IMPORTANT: Always check and if necessary refactor your Gruntfile.js when adding more source files to your project.

The Grunt tasks configured in Gruntfile.js may not know about any new files you add to your Project, so it's crucial to keep them in sync with any changes to your Project files/folders.

##Grunt Watch

Keep a cmd/terminal window open, switch to myproject root, and run the Grunt-Watch task:

cd myproject
grunt watch

This will automatically compile/lint your SASS/JavaScript changes, every time you save an edit.

##LiveReload

The Grunt-Watch task has its livereload option enabled, so with minimal setup you can have your browser automatically refresh your page with your new changes, every time you edit and save a SASS/JavaScript source file.

You can install Chrome LiveReload and Firefox LiveReload browser-extensions to make this work. For IE/Safari/Opera, which I don't use nearly as often, google what's available out there.

Clone this wiki locally