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 🙏

© 2024 – Pkg Stats / Ryan Hefner

rendr-cli

v0.5.0

Published

A CLI for Rendr

Downloads

3

Readme

Rendr CLI Build Status

The goal of Rendr CLI is to provide the ablility to generate Rendr apps and app components quickly and efficiently.

This project is in an early alpha stage.

Getting Started

Assuming Node and npm are present and accounted for, install the Rendr CLI with:

npm install rendr-cli -g

Usage

Usage: rendr <command> [options]

Options:

  -h, --help                       output usage information
  -V, --version                    output the version number
  -c, --coffee                     generators in Coffeescript
  -u, --url <url>                  Set a url (evaluated when generating a model or collection)
  -a, --api <api>                  Set an apiHost (evaluated when generating a model or collection)
  -i, --idAttribute <idAttribute>  Set an idAttribute (evaluated when generating a model)
  --addCollection                  Will generate the corresponding collection (evaluated when generating a model
  --noTemplates                    Do not generate templates (evaluated when generating a view)

Commands:

   n, new <appName>                               Creates a new Rendr project
   g, generate <component> <name> [options]       Generate a model/view/controller/scaffold with <name>
   g, generate collection <modelName> [options]   Generate a collection with <modelName>

Creating a Rendr App

The rendr new command creates a new Rendr application with a default directory structure and configuration relative to the directory you are executing the command from.

For example:

rendr new APPNAME

This generates a skeletal Rendr installation in <current path>/APPNAME.

Generating Models:

By default, generating a model will provide you a bare-bones scaffolded model file.

For example:

rendr generate model MODELNAME

This generates a nearly empty model at APPNAME/app/models/MODELNAME

You may make the model more useful by optionally setting the --url, --idAttrubute, or --api options. These flagnames match exactly the resulting keys, and values, that are produced in the generated model.

Additionally, you may also pass the --addCollection option which will generate a corresponding collection for your model.

Generating Collections

When generating a collection, like the model generator, pass the model name that you wish to associate the collection with.

For example:

rendr generate collection MODELNAME

You may make the collection more useful by optionally setting the --url, or --api options. These flagnames match exactly the resulting keys, and values, that are produced in the generated collection.

Generating Views:

Generating a view will produce multiple bare view files. One for each action (index, if none are specified).

Additionally, views will automatically generate the associated templates directories/files unless the --noTemplates option is specified

If you wish to add more actions to your view, beyond the default index action you may pass additional arguments to the generator like so

For example

rendr generate view VIEWNAME ACTION1 ACTION2 ACTION3

Will generate the ACTION1, ACTION2, and ACTION3 view files in the APPNAME/app/views/VIEWNAME directory. AND templates for ACTION1, ACTION2, and ACTION3 in the APPNAME/app/templates/VIEWNAME directory.

Controllers:

Controller files will be generated with an entry for each action (index, if none are specified).

Like views, if you wish to add more actions to your controller, beyond the default index action, you may pass additional arguments to the generator like so

For example

rendr generate controller CONTROLLERNAME ACTION1 ACTION2 ACTION3

Will generate the ACTION1, ACTION2, and ACTION3 controller entries in the APPNAME/app/controllers/CONTROLLERNAME file.

Scaffolds:

Scaffolds will generate views and controllers, as such they follow all the same rules and optional flags

For example

rendr generate scaffold SCAFFOLDNAME ACTION1 ACTION2 ACTION3

Will generate the ACTION1, ACTION2, and ACTION3 view files in the APPNAME/app/views/SCAFFOLDNAME directory.
AND templates for ACTION1, ACTION2, and ACTION3 in the APPNAME/app/templates/SCAFFOLDNAME directory.
AND generate the ACTION1, ACTION2, and ACTION3 controller entries in the APPNAME/app/controllers/SCAFFOLDNAME file.

Contributing

If you have a bug fix or feature proposal, submit a pull request with a clear description of the change, plus tests.

License

Copyright (c) 2013 Joseph (Jos) Smith
Licensed under the MIT license.