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

generator-clay

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-clay

Generate Clay instances, sites, and components

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

generator-clay

A Yeoman generator for Clay

Circle CI

Component Generator

You can use the component generator to generate new components in your clay repo.

yo clay:component <name>

This will create a folder in components/ with the name of your component, and will also add some files:

  • all.css
  • print.css (with display: none by default)
  • template.<lang> where <lang> is the language of your choice
  • bootstrap.yml
  • schema.yml

If you select nunjucks or jade, the template will have a tag (if specified), a class with your component's name, and the data-uri attribute used by kiln.

The bootstrap and schema will have fields (text by default) that you've specified.

Note: Your template language choice will be stored as the default the next time you run this generator, saving you time when creating multiple components.

--tag

You can pass a --tag argument with the name of the tag/element you want to use, rather than using the default of section. The acceptable tags are defined in the tags json.

yo clay:component <name> --tag <tag>

--viewports

In addition to the default all.css and print.css, you can specify viewports to be created.

yo clay:component <name> --viewports <m or mobile>

# would create 0-600.css

yo clay:component <name> --viewports <t or tablet>

# would create 600-1024.css

yo clay:component <name> --viewports <d or desktop>

# would create 1024+.css

You can also specify arbitrary viewports by passing in a comma-separated string. For more details on the syntax, see responsive-filenames.

yo clay:component <name> --viewports 0-300,300-600,600+,1200+

# would create:

0-300.css
300-600.css
600+.css
1200+.css

Site Generator

You can use the site generator to generate new sites in your clay repo.

yo clay:site <name>

It will prompt you for the human-readable name, domain, and path. It'll add these files:

  • index.js with a default route
  • config.yml with your site config
  • local.yml pointing to localhost. This allows you to develop quickly and easily

Keywords

FAQs

Package last updated on 15 Oct 2015

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