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

generator-chris

v1.1.9

Published

A generator for Yeoman

Downloads

28

Readme

generator-chris Build Status

A generator for Yeoman.

Getting Started

What is Yeoman?

Trick question. It's not a thing. It's this guy:

Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.

Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.

$ npm install -g yo

Yeoman Generators

Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.

To install generator-chris from npm, run:

$ npm install -g generator-chris

This generator is based on previous work that I have done (see: yo dawg). I thought that I would start to consolidate generators for IBM Worklight and Cordova based applications into this generator instead. So far, this generator works with Worklight (Cordova support will be added in future versions).

What can you do?

  1. Scaffold a dojox/app based IBM Worklight project
  2. Scaffold a jQuery mobile with Angularjs based IBM Worklight project
  3. Scaffold a Twitter Bootstrap with Angularjs based IBM Worklight project

IBM Worklight

dojox/app

Create a new Worklight project with dojo library support. Then issue the following commands. This will stub out a dojox/app project.

$ cd <to root of IBM Worklight project>
$ yo chris

You can then create a new environment with:

$ yo chris:env <worklight env name e.g. iphone>

You can create a new dojox/app view with the following command. NOTE: View will be appended to the end of the view name automatically:

$ yo chris:view <name of view e.g. home>

You can start a rapid dev env by issuing the following command. This will watch the files in your custom packages e.g. commonapp, iphoneapp. Once a save is done, the files will be linted, and the browser will issue a live reload:

$ grunt dev

You can choose to build the project using requirejs with the following command. See the grunt-config.json file for individual targets if you need:

$ grunt

You can choose to add documentation generation based on jsdoc3 (http://usejsdoc.org/#JSDoc3_Tag_Dictionary) to your code. Executing the following commands will add a lightweight requirejs + Express server (https://github.com/chrisfelix82/rexpress) to your workspace. You can then view generated docs at http://localhost:3434 after starting the server.

$ yo chris:docs init
$ cd ../rexpress
$ npm install
$ cd ../<mobile project>
$ grunt rexpress (starts the express server at port 3434)

You can generate the docs anytime with the following command. Then visit http://localhost:3434/

$ grunt jsdoc

jQuery mobile + Angular or Twitter Bootstrap + Angular

Create a new Worklight project. Then issue the following commands. This will stub out a JQuery mobile app that uses Angular for data binding.

$ cd <to root of IBM Worklight project>
$ yo chris

You can then create a new environment with:

$ yo chris:env <worklight env name e.g. iphone>

You can create a new view with. NOTE: View will be appended to the end of the view name automatically:

$ yo chris:view <name of view e.g. home>

You can start a rapid dev env by issuing the following command. This will watch the files in your custom packages e.g. commonapp, iphoneapp. Once a save is done, the files will be linted, and the browser will issue a live reload. Unit tests will also be run (if any):

$ grunt dev

You can choose to build the project using requirejs with. See the grunt-config.json file for individual targets if you need:

$ grunt

You can choose to add documentation generation based on jsdoc3 (http://usejsdoc.org/#JSDoc3_Tag_Dictionary) to your code. Executing the following commands will add a lightweight requirejs + Express server (https://github.com/chrisfelix82/rexpress) to your workspace. You can then view generated docs at http://localhost:3434 after starting the server.

$ yo chris:docs init
$ cd ../rexpress
$ npm install
$ cd ../<mobile project>
$ grunt rexpress (starts the express server at port 3434)

You can generate the docs anytime with the following command. Then visit http://localhost:3434/

$ grunt jsdoc

Tasks to help you set-up an IBM Worklight test server

If you have purchased the production version of IBM Worklight, then the following grunt tasks can help you to quickly set-up an integration test server assuming you are using WebSphere Liberty and DB2.

This command sets up the Worklight and Worklight reports databases on DB2. Before running this command, ensure that the correct property values are set in Build/scripts/build.xml.

$ grunt configure_DB2

This command builds the Worklight WAR that contains the administration console.

$ grunt buildWAR

This command then deploys the WAR to the Liberty server.

$ grunt deployWAR_Liberty

If you need to update the WAR for whatever reason (e.g. you change authenticationConfig.xml), then the following command will update the WAR. It will uninstall the WAR, build a new one and then deploy it to the Liberty server. You will need to restart the server every time you deploy a new WAR.

$ grunt updateWAR

Notes

A project is created called "Build" in the workspace. If you are using Eclipse, this project will not show up unless you create a new general project in the workspace with the name of "Build". Once the project is visible, read the README.md file under Build/lib. If you wish to use the grunt build, then you will have to have the IBM Worklight jars that ship with the production version of the product. They are not distributed with this generator due to licensing restrictions.

If you wish to drive the build through RTC, the easiest way is to create a command line based jazz build definition. Set the working directory to be your Worklight project's directory, and the command should simply be "grunt". This is the same as you would do manually from the command line. Of course the Workight tasks depend on ant and node, so you will have to install those on the build engine machine.

The build does not produce layers, it only minifies and obfuscates the source files. If you are use to doing a dojox/app custom build, then you will have to set one up manually. This generator does not deal with that. If you are using dojox/app, you may consider using "yo dawg" - https://github.com/chrisfelix82/dawg, which has a build that is specifically tailored for custom dojo apps.

If you decide to use the documentation server (i.e. through yo chris:docs init), then you need to create a general project in eclipse called rexpress. This is because Eclipse does not refresh the project by that name that gets created by the generator.

Getting To Know Yeoman

Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.

If you'd like to get to know Yeoman better and meet some of his friends, Grunt and Bower, check out the complete Getting Started Guide.