GithubHelp home page GithubHelp logo

cachance7 / generator-ember Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deprecate/generator-ember

0.0 1.0 0.0 1.09 MB

Yeoman generator for Ember.js web applications

Home Page: http://yeoman.io

JavaScript 80.59% CoffeeScript 6.92% CSS 12.33% Shell 0.16%

generator-ember's Introduction

Ember.js Generator Build Status

Maintainer: Fayimora Femi-Balogun

The Ember.js generator aims to provide intelligent scaffolding for Ember.js web applications, offering a sane project structure, dependency management and build-time optimization for your scripts, stylesheets and assets. It is a compliment to Ember App Kit and can be used on it's own or in conjunction with another set of tools or boilerplates.

This project is an ongoing community effort, and efforts to find the easiest ways to architect applications continue. We welcome your issues and PRs for features, bug fixes, and anything that would improve your quality of life as an Ember developer.

ScreenShot

Table of Contents

Pre-reqs

  • npm
  • compass
  • npm install -g grunt-contrib-compass
  • Ruby
  • gem install compass

You should have one path each for:

which ruby && which compass

Tutorials

You can either get started using the guide in our documentation lower down or via one of the community-authored tutorials about this generator.

Usage

  • npm install -g generator-ember
  • mkdir myemberapp && cd myemberapp(The directory's name is your application's name)
  • yo ember
  • npm install -g grunt-mocha
  • grunt serve

A welcome page should appear in your browser.

Generators

Add'l generators:

  • ember:model
  • ember:view
  • ember:controller

ember:model

Creates a model, views, handlebars, controllers, view/edit routes, and some basic fixtures given an arg, as in:

yo ember:model User name:string zipcode:number

see:

see also:

ember:view

Creates a view and template given an arg, as in

yo ember:view Foo

KNOWN ISSUE: IF YOU ADD A NEW VIEW, REGARDLESS OF WITH WHICH GENERATOR, YOU HAVE TO RESTART THE SERVER.

ember:controller

Creates a view, handlebar, controller and route given an arg, as in:

yo ember:controller Bar

(and updates router.js, overwrite when prompted)

see:

Options

  • --skip-install

    Skips the automatic execution of bower and npm after scaffolding has finished.

  • --test-framework=[framework]

    Defaults to mocha. Can be switched for another supported testing framework like jasmine.

  • --coffee

    Enable support for CoffeeScript.

  • --karma

    Enables support for karma test runner

Testing

Testing your app is as simple as running grunt test. The generator ships with the karma test runner for running the tests. Integration tests are written with ember-testing and preferably mocha. Karma is highly configurable and you can take a look at the varity of options on its website.

Troubleshooting

Command not found

Manifests as: -bash: yo: command not found

You need to make sure that npm is on your path. Add the following to your .bash_profile (or .bashrc):

PATH=/usr/local/share/npm/bin:$PATH

templateName issues

Manifests as: You specified the templateName ... but it did not exist.

You probably added a view; restart the server.

Changelog

See the changelog file

Roadmap

Please take a look at #144 for a detailed list of updates on our roadmap.

Modules

Support for ES6 modules are currently on our roadmap, but are not yet implemented. In the interim, we are happy to recommend using the ES6 Module Transpiler via grunt-es6-module-transpiler to get transpilation support for modules in your Ember.js apps.

This will turn your ES6 module syntax into AMD (RequireJS-style) modules and using the transpiler you can write code using tomorrow's syntax today. Note: actually scaffolding ES6 modules will not be supported until this generator adds that feature.

Contribute

Basics

See the contributing docs

When submitting an issue, please follow the guidelines. Especially important is to make sure Yeoman is up-to-date, and providing the command or commands that cause the issue.

When submitting a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.

When submitting a new feature, add tests that cover the feature.

Tips

Here are some of the techniques I use; maybe they're useful for you.

When developing...

  • in generator-ember dir, npm link to use what's in the local repo for yo ember
  • wipe the example webapp dir clean (cd .. && rm -rf webapp) from time-to-time to ensure the code output is coming from the latest generator (will re-install everything via npm, so be forewarned)
  • script/reset_dev_env.sh is there to help when you don't want to wipe and reinstall a test dir with Bower and Node modules again-and-again; read it and understand it before you use it. It's good if you want to smoke-test changes, bad if you update Bower and/or Node mods (ignores removing their subdirs.)

Background

License

BSD license

generator-ember's People

Contributors

inkredabull avatar fayimora avatar passy avatar sindresorhus avatar addyosmani avatar josemotanet avatar iamolivinius avatar kevva avatar rafshar avatar kraftwer1 avatar matthewlehner avatar mklabs avatar revathskumar avatar therufs avatar globegitter avatar dragulceo avatar smackesey avatar macavon avatar robotlovesyou avatar cachance7 avatar sleeper avatar glavin001 avatar chadfennell avatar yujingz avatar rrott avatar nicolai86 avatar manusajith avatar lulezi avatar lawnsea avatar dustmason avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.