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

choo-cli

v2.1.0

Published

create choo apps from the command line

Downloads

44

Readme

choo-cli npm Build Status MIT Licensed

This is a tool for generating choo apps.

demo

To Install (you'll need at least node v6):

npm install choo-cli -g

Using choo-cli will scaffold out a project and help generate additional files like models, pages, and elements. It also generates common scripts you can use to build/test/serve your choo app.

# generate a new project folder,
# comes with package.json, readme, and recommended structure
choo new my-new-project 

# using yarn?
choo new my-new-project --yarn

# generate a new page
choo generate page my-new-page

# generate a new model
choo generate model my-new-model

# generate a new element
choo generate element my-new-element

# run your app at localhost:8080
npm start

# build your app for production
npm run build:prod

# test your app
npm test

Usage

Choo-cli runs off of node and npm, you can install choo-cli globably with the following command:

The basic signature of a choo-cli command look like this:

$ choo <command> <name> [options]

For example to create a new project skeleton we can run:

$ choo new my-project

You can now cd into my-project

$ cd my-project

Choo-cli will create a directory structure that for slim applications and reusability.

assets/        images and fonts, if you have any
elements/      standalone application-specific elements
lib/           generalized components, should be moved out of project later
models/        choo models
pages/         views that are directly mounted on the router
scripts/       shell scripts, to be interfaced with through `npm scripts`
client.js      main application entry; programmatic manifest file
package.json   manifest file

Custom templates

You can also install custom templates from Github, like this

$ choo new <project> from <github-user>/<github-repo>

Custom templates must have ejs templating syntax.

Using yarn

You can have the choo-cli use yarn over npm, like this

$ choo new <project> from <github-user>/<github-repo> --yarn
# or
$ choo new <project> --yarn
# or
$ choo new <project> --yarn from <github-user>/<github-repo>

Debug mode

Choo-cli uses debug - a popular logging framework.

Enable debug mode by adding an environment DEBUG to have choo-cli* as its value

DEBUG=choo-cli* choo new ...

Generators

You can use choo-cli to generate pieces of your project as you are developing. For example you can generate

Pages

$ choo generate page my-page

Models

$ choo generate model my-model

Elements

$ choo generate element my-element

npm scripts

Choo-cli was made for generating choo projects and code, and leverages npm scripts for certain project task. So in our project a set of npm scripts have already been generated that perform various tasks such as testing/serving/building/etc.

At any time you can review the complete list of npm scripts available by viewing package.json or by running the following command:

$ npm run

Here is complete list the the commands and their function

  • start - start dev server at localhost:8080
  • build:prod - builds your project to deploy to a server
  • test - runs unit tests, for now it will just run linting.
  • lint - runs eslint against your code

So for example you can run npm start to start a dev server. You can now see your app running at localhost:8080 first time this will pull in your node deps and start a budo server

License

MIT ©