npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ember-cli-gen

v1.0.19

Published

Ambitious crud generators for EmberJS

Readme

ember-gen

Ambitiously generate application layout and CRUD views for your ember apps.

ember-gen is a addon to base your Ember application on if you want to rapidly construct common, yet powerful, CRUD views for your models.

gen modules, the fundamental elements of ember-gen, along with the components and styles included in the addon, provide a complete toolset which can be used to setup a decent web application in no time.

The most essential ember-gen features include,

  • Responsive application layout
  • Model CRUD (list,create,edit,details views)
  • Auto-generated forms with validation support (using ember-changeset-validations)
  • Authentication (using ember-simple-auth)
  • I18N (using ember-i18n)
  • TODO Authorization (using ember-can)

Installation

Prerequisites

  • An (preferably new) ember (2.8+) project.
  • A set of models the addon will use to generate views for.

To install the addon to your project run

ember install ember-cli-gen

Usage

Installing ember-gen using ember-cli automatically executes the default addon generator and sets up your project with an application template. If not, consider running

ember g ember-cli-gen

You may then edit the template located at app/templates/application.hbs in order to change the application settings (title, icon etc.)

Create a Gen module

ember-gen uses gen modules to build up your application. To create a gen module use the provided generator, it accepts a single argument which should be the name of an existing model

ember g gen <modelName>

The generator will create a file named after the provided argument in the app/gen directory. The gen module uses CRUDGen generator to build CRUD views for your model. More specifically the following things are automatically generated:

  • A menu entry to the application navigation sidebar
  • A list route/view set which lists the model records
  • Create and edit route/view sets. Form fields are automatically generated based on each field attr type.
  • Common set of object related and navigational actions and links placed along the generated views which lets you navigate around the application routes.

CRUDGen configuration

export default CRUDGen.extend({
    auth: true/false/null // require authenticated user, anonymous, or any
    appIndex: true, // by default redirect to this Generator index view
    modelName: 'myModel',

    common: {},

    list: {},
    create: {},
    edit: {},
    details: {}
})

CRUDGen objects accept a set of attributes in order to configure the generated views layout and behaviour. The following views are currently generated

  • list
  • create
  • edit
  • details

each view accepts its own configuration parameters via the corresponding attribute named after the name of the view. If you want to apply a set of configuration parameters to all the views you may use the special attribute common. Each key set to this attribute will be merged to all CRUD view configuration objects.

CRUDGen.list configuration

menu.label The text to be displayed to the menu item which links to the underlying view. This attribute is also used in page breadcrumb titles.

menu.icon The icon to be displayed to the menu item.

page.title The title of the page to be displayed when the view is currently visited.

getModel Hook which will be used by the route to resolve the route model. By default the view will return the store.findAll(modelName) result.

row.fields A list of model properties to be displayed in each list row

CRUDGen.edit and CRUDGen.create configuration

menu.label See list configuration

menu.icon See list configuration

page.title See list configuration

getModel See list configuration. Defaults to store.find(mode, params.id).

processModel Hook which allows you to modify the resolved model of getModel hook. You may use this hook to set default properties to the underlying record.

fieldsets A list of dicts.

fieldsets.[].label The fieldset label.

fieldsets.[].text The fieldset help text. Defaults to ''.

fieldsets.[].fields The list of fields to be displayed to the generated form. Deafults to all the model fields.

fieldsets.[].exclude A list of fields to be excluded from the generated form. Defaults to [].

fieldsets.[].readonly A list of fields which will appear as readonly to the form. Defaults to [].