Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@choo/cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@choo/cli

out-of-the-box tooling and scaffolding for choo.js

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@choo/cli

This is a tool for generating Choo apps.

To Install:

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

# 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

# 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 we've found to be optimal 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

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 - 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

Keywords

FAQs

Package last updated on 03 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc