• This repository has been archived on 21/Nov/2018
  • Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    CoffeeScript
  • License
    Other
  • Created about 11 years ago
  • Updated almost 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🚫 UNMAINTAINED: A Brunch skeleton for rapid Ember development. Including Ember installation scripts, environment-specific JS builds, generators, and Ember.vim support.

DEPRECATION WARNING

Tapas with Ember will not be maintained after Ember 2.0 is released. Please use Ember CLI instead.

Tapas with Ember Build Status

A Brunch skeleton for rapid Ember development. Including Ember installation scripts, environment-specific builds, generators, and Ember.vim support.

Me talking about Tapas with Ember

Features

  • Ember Install Script - Cakefile scripts to install the latest Ember, Ember Data, and Ember Model.
  • Environments - Custom code to allow for environment detection in the browser and at compile time. Automatically uses Ember's production build when in production just like ember-rails.
  • Automatic File Loading - Automatically loads you code, no script tags or superfluous requires necessary.
  • Ember.vim support - Navigate to and create models, controllers, templates, and views with ease.

Brunch Plugins

Setup

Before using Tapas with Ember you will need to install Node, CoffeeScript, Brunch, and Bower.

npm install -g brunch coffee-script bower

Now that you've got Brunch installed, you're three commands away from a running Ember app!

brunch new gh:mutewinter/tapas-with-ember <appname>
cd <appname>
cake server

Open localhost:7435 and check out your brand new Ember app! Every time you save a file, the browser will automatically refresh.

Tapas with Ember runs the latest release channel Ember and latest beta of Ember Data. You can update to Beta or Canary builds using cake ember:install. It's also easy to install the latest Ember Data or Ember Model using the cake scripts below.

Testing

To run run tests headlessly you'll need need to install phantomjs.

brew update && brew install phantomjs

Running Tests Once

npm test

This command will install all dependencies, build the application in the test environment, and run the tests.

Running Tests Automatically

In two terminal sessions, run these commands:

npm run-script test:watch
cake test:watch

Testem will now rerun tests every time your app code changes. You can switch test:watch to test:server if you'd also like to manually interact with the app on http://localhost:7435.

Testing in Other Browsers

If you want to run your tests on other browsers, modify your testem.yml file to include the additional browsers. For example:

launch_in_dev: ['PhantomJS', 'Chrome', 'Firefox', 'Safari']

You can see a list of available launchers by running the command testem launchers.

Frequently Asked Questions

See the FAQ in the Wiki for answers to questions like:

  • How do I add a JavaScript / CSS Library?
  • How do I add Bootstrap?
  • How do I detect the environment?
  • How do I set Ember feature flags?

Technology

NPM Dependency Status This will always say out of date because I'm using jQuery 1.X for IE compatibility.

Updating Libraries

Ember

Tapas with Ember ships with the latest release channel Ember. You can install other versions of Ember using the commands below.

cake ember:install
# cake -t "v1.9.1" ember:install # for v1.9.1 tagged release
# cake -c "beta" ember:install # for beta
# cake -c "canary" ember:install # for canary

Note: cake ember:list displays the tagged releases since 1.0.0.

Ember Data

cake ember-data:install
# cake -t "v1.0.0-beta.9" ember-data:install # for v1.0.0-beta.9 tagged release
# cake -c "canary" ember-data:install # for canary

Note: cake ember-data:list displays all tagged releases.

Ember Model

cake ember-model:install

Note: Ember Model can not be used with Ember Data.

Generators

This skeleton makes use of scaffolt generators to help you create common files quicker.

To use first install scaffolt globally with npm install -g scaffolt. Then you can use the following command to generate files.

scaffolt arraycontroller <name>   β†’    app/controllers/<name>s.coffee
scaffolt component <name>         β†’    app/components/<name>.coffee
                                       app/templates/components/<name>.hbs
scaffolt controller <name>        β†’    app/controllers/<name>.coffee
scaffolt helper <name>            β†’    app/helpers/<name>.coffee
scaffolt initializer <name>       β†’    app/initializers/<name>.coffee
scaffolt mixin <name>             β†’    app/mixins/<name>.coffee
scaffolt model <name>             β†’    app/models/name.coffee
scaffolt route <name>             β†’    app/routes/<name>.coffee
scaffolt router                   β†’    app/config/router.coffee
scaffolt template <name>          β†’    app/template/<name>.hbs
scaffolt view <name>              β†’    app/views/<name>.coffee

Compiling for Production

Both the development and production versions of Ember are installed via the ember:install cake task. To compile your project with the production version of Ember with hashed file names, run:

cake build

Now the public folder will contain your production-ready Ember app.

Deploy

Tapas with Ember comes with a Mina deployment script to deploy your app to your own server.

  1. Install Mina by running gem install mina
  2. Fill in your credentials in config/deploy.rb
  3. Setup your server, I use Nginx with this config
  4. Run mina setup
  5. Run mina deploy

Scripts

The following cake scripts are provided.

cake server               # start the brunch server in development
cake watch                # build the app continuously without a server
cake build                # build for production
cake build:test           # build for test
cake test:watch           # run brunch in test environment and watch for changes
cake test:server          # run brunch in test environment, watch for changes, and run server
cake tapas:update         # update Tapas to latest (Cakefile, package.json, portkey.json, config.coffee, generators/*)
cake ember:install        # install latest Ember
cake ember:list           # list tagged relases of Ember since v1.0.0
cake ember-data:install   # install latest Ember Data
cake ember-data:list      # list tagged relases of Ember Data
cake ember-model:install  # install latest Ember Model

The following npm scripts are provided

npm test                  # Install dependencies, build for test, run tests
npm run-script test:watch # Run tests continuously when files change

Pow.cx

To use this app with Pow.cx, follow these simple steps:

  1. Install Pow.cx
  2. echo 7435 > ~/.pow/<appname>
  3. Start the server with cake server
  4. Open http://appname.dev

Ember.vim Support

Custom Ember.vim support is provided via portkey.json. You can navigate to files via these commands:

:Eadapter
:Easset <name>       β†’ app/assets/<name>
:Ecomponent <name>   β†’ app/components/<name>.coffee
:Econfig <name>      β†’ app/config/<name>.coffee
:Econtroller <name>  β†’ app/controllers/<name>.coffee
:Ehelper <name>      β†’ app/helpers/<name>.coffee
:Einitialize
:Einitializer <name> β†’ app/initializers/<name>.coffee
:Emixin <name>       β†’ app/mixins/<name>.coffee
:Emodel <name>       β†’ app/models/<name>.coffee
:Eroute <name>       β†’ app/routes/<name>.coffee
:Estyle <name>       β†’ app/styles/<name>.styl
:Etemplate <name>    β†’ app/templates/<name>.hbs
:Etest <name>        β†’ test/<name>_test.coffee
:Eutility <name>     β†’ app/utilities/<name>.coffee
:Eview <name>        β†’ app/views/<name>.coffee

Updating Tapas with Ember

Tapas with Ember has a built-in update script.

cake tapas:update

It updates and overwrites Cakefile, package.json, portkey.json, config.coffee, generators/*.

Thanks To

More Repositories

1

dot_vim

My 12 Year-Old (Neo)Vim Configuration
Vim Script
681
star
2

Showbot

πŸ€– An IRC Bot and Website for 5by5.tv written with the Cinch and Sinatra frameworks
Ruby
90
star
3

digest-brunch

Unsupported: A Brunch plugin that appends a unique SHA digest to asset filenames.
CoffeeScript
32
star
4

why_ember

Why should I use Ember.js? A presentation about Ember.js built with Ember.js.
CoffeeScript
22
star
5

Framer

πŸ“² Python and JSTalk script for acorn to add device frames to iPhone and iPad
Python
15
star
6

.dot

πŸ“‘ My non-vim dot files.
Shell
11
star
7

workflows2md

πŸ›… Make a list of your Alfred Workflows in Markdown.
JavaScript
8
star
8

plates

🍽 An Ember app for sharing links built for StaticShowdown.
CoffeeScript
7
star
9

Camelmark

A bookmarklet to look product pricing history on http://camelcamelcamel.com
JavaScript
5
star
10

GIFL

Add "wrap terms in google I'm feeling lucky url" Γ  la Textmate
Vim Script
4
star
11

cuesnap

βœ‚οΈ Snapping MP3s with cue sheets faster than your mom pops Pringle tops.
Ruby
4
star
12

view-images-bookmarklet

A bookmarklet to find all the images on a page and show them to you in a new window for easy viewing and downloading.
HTML
3
star
13

ShowGap

πŸ’” Filling the gap between podcast hosts and their listeners.
CoffeeScript
3
star
14

stretch

What do you do before you Sprint? Stretch. An Ember app for Sprint.ly.
CoffeeScript
2
star
15

UnconditionalPaste

A clone of UnconditionalPaste from http://www.vim.org/scripts/script.php?script_id=3355 since it's not updated on GitHub yet.
Vim Script
1
star
16

not-out

β›΄ A small script to list the commits that haven't been deployed, given a SHA.
CoffeeScript
1
star
17

ir_black_mod

Updated ir_black_mod with some extra colors for my custom vim config
Vim Script
1
star
18

less_is_more

A presentation about CoffeeScript with interactive code samples built with Ember.js
CoffeeScript
1
star