generator-ember-less

0.1.0 • Public • Published

Ember.js Generator with Less and other libraries Build Status

Maintainer: Víctor Siguero

The scaffolding tool for Ember.js apps with Less and other libraries, forked from generator-ember getting a "quick-starter" kit for developing with ease.

This is a fork from generator-ember but using other libraries:

  • Bootstrap Less version using Grunt Recess
  • Ember Data & Ember Model for the developer to choose from (defaults to Ember Model)
  • Bootswatch Themes repo for Bootstrap 3.0.0
  • Ember Bootstrap from Ember addons that adds Boostrap components as Ember components in views
  • Grunt Rsync taks for deploying to remote server with rsync/SSH

ScreenShot

Table of Contents

Pre-reqs

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

You should have one path each for:

which ruby && which compass

Usage

  • npm install -g generator-ember-less
  • mkdir webapp && cd webapp
  • yo ember
  • npm install -g grunt-mocha
  • grunt server

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

TODO

  • Change tests to instantiate and test objects instead of grepping for text
  • DRY up/refactor tests
  • Consider ES6 as base structure
  • Remove Ruby dependency

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

Readme

Keywords

none

Package Sidebar

Install

npm i generator-ember-less

Weekly Downloads

0

Version

0.1.0

License

none

Last publish

Collaborators

  • vsiguero