Socket
Socket
Sign inDemoInstall

generator-clay-component

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-clay-component

A yeoman generator for Clay components!


Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

generator-clay-component

A yeoman generator for Clay components!

Circle CI npm version

Installation

npm install --global generator-clay-component

Or you can use the yeoman interactive menu!

Usage

First, make sure you're running this generator from the root directory of your Clay instance!

To create a new component, simply call the generator with the component's name. Make sure to use kebab-case!

yo clay-component foo-bar

The generator will ask you a few short questions, then spin up the new component in your components/foo-bar folder.

  1. What does this component do? – Write a short, one-line description of your component
  2. What tag should this component use? – Select the tag you want to use (or comment, for a component that lives in the <head>)
  3. Does it need client-side javascript? – This will create a client.js with a dollar-slice controller
  4. Does it need server-side javascript? – This will create a server.js and server.test.js for you do logic on GET and PUT

Interactive prompts are nice, but who has the time? My twitter feed won't read itself!

You can also use command line flags for all of these options:

  • --desc <words> or -d <words> – description
  • --tag <tag name> or -t <tag name> – tag (note: you can also specify custom tags this way!)
  • --client or -c – if you want client scripts
  • --server or -c – if you want server scripts

If you're a speed daemon, your component might look like this:

yo clay-component fizz-buzz-enterprise -d "FizzBuzz Enterprise Edition" -t article -cs

Contributing

We're busy people, so we probably missed something! Let us know by submitting an issue, or better yet submit a pull request with a failing test. We use linting tools and unit tests, which are built constantly using continuous integration.

Keywords

FAQs

Package last updated on 26 Jan 2017

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