# Pyro > Build Ember.js apps with CoffeeScript and Sass... without all that damn configuration. [![Gem Version](https://badge.fury.io/rb/pyro.png)](http://badge.fury.io/rb/pyro) [![Dependency Status](https://gemnasium.com/jarrodtaylor/pyro.png)](https://gemnasium.com/jarrodtaylor/pyro) [![Code Climate](https://codeclimate.com/github/jarrodtaylor/pyro.png)](https://codeclimate.com/github/jarrodtaylor/pyro) [![Build Status](https://travis-ci.org/jarrodtaylor/pyro.png?branch=master)](https://travis-ci.org/jarrodtaylor/pyro) [![Coverage Status](https://coveralls.io/repos/jarrodtaylor/pyro/badge.png?branch=master)](https://coveralls.io/r/jarrodtaylor/pyro?branch=master) --- Pyro is a Ruby gem for building Ember.js apps. Under the hood, it's a build script wrapped in a web server. ## tl;dr ```bash ~ $ gem install pyro ~ $ pyro new MyApp ~ $ cd MyApp ~/MyApp $ pyro serve # => http://localhost:5678 ``` ## Install Pyro From Rubygems.org: ```bash ~ $ gem install pyro ``` This will install the Pyro CLI that you'll use to create, build, and serve your Ember.js apps. ## Create a New App The ```pyro new``` command will generate a new app: ```bash ~ $ pyro new MyApp ~ $ cd MyApp ``` Your app starts with three folders. - ```/assets``` for storing static files. - ```/lib``` for writing your code. - ```/vendor``` for storing third party code. ```/vendor``` comes preloaded with jQuery, Handlebars, Ember, and Ember Data. ```/lib``` is the basic Ember Starter Kit, rewritten in CoffeeScript and placed in a sensible default folder structure. Consider this your starting point. From here, add write your app in any combination CoffeeScript, JavaScript, Sass, Less, and CSS. Put your code in a file structure that makes sense, and link it all together in ```/lib/index.erb```. Pyro comes with a few Ruby helpers to make it easier: ```erb <%= stylesheet src: 'css/bootstrap.css' %> <%= stylesheet dir: 'css/themes' %> <%= template src: 'views/application.hbs' %> <%= template dir: 'views/components' %> <%= script src: 'app.coffee' %> <%= script dir: 'models' %> ``` All three helpers can accept either a single file (```src:```) or a directory (```dir:```). During the build process, scripts and stylesheets are compiled and linked to in place of the helper. Templates are inserted inline. Using these helpers lets your organize your application's folder structure and your code's load order without having to edit any config files or build scripts. ### Scripts, Stylesheets, and Templates Pyro uses file extensions to determine how to compile your and link to your code. Supported languages include: - CoffeeScript (.coffee) - JavaScript (.js) - Sass (.scss) - CSS (.css) - Handlebars (.hbs, .handlebars, .x-handlebars) > Templates are given a ```data-template-name``` attribute with a value matching their filename. ## Run Your App The ```pyro serve``` command loads your app into a built-in dev server: ```bash ~/MyApp $ pyro serve # => http://localhost:5678 ``` Just start the server and visit [localhost:5678](http://localhost:5678). If you want to skip building ```/assets``` and ```/vendor``` on reloads, just pass the ```--fast``` option. ```bash ~/MyApp $ pyro serve --fast # => http://localhost:5678 ``` Everything will be built on the first page load, but reloads will only rebuild ```/lib```. This is useful for speeding up builds with large asset files and vendor libraries that rarely change. ## Build for Production When you're ready to deploy, the ```pyro build``` command will compile and minify your app into ```/builds/production/```: ```bash ~/MyApp $ pyro build # => MyApp is compiled and minified into ~/MyApp/builds/production/20130816020233/ ``` > You may want to add your release folders to your .gitignore file. Now you're ready to deploy your app to a production server.