Socket
Socket
Sign inDemoInstall

generator-client-swag

Package Overview
Dependencies
170
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    generator-client-swag

None


Version published
Maintainers
1
Install size
14.7 MB
Created

Readme

Source

generator-client-swag

This is a yeoman generator for a faster client side development

Installing

Run from your terminal:

npm install yo -g
npm isntall generator-client-swag -g

Usage

Dumb component with unit test (not connected to redux)

yo client-swag:component {{ComponentName}}

Will create next file structure:

+-- {{component-name}}
|   -- index.js
|   -- {{compnent-name}}.jsx
|   -- {{compnent-name}}.spec.jsx
|   -- {{compnent-name}}.scss

Dumb component without unit test (not connected to redux)

Adding --skip-test option will skip test file.

yo client-swag:component {{ComponentName}} --skip-test

Will create next file structure:

+-- {{component-name}}
|   -- index.js
|   -- {{compnent-name}}.jsx
|   -- {{compnent-name}}.scss

Smart component with unit test (connected to redux)

yo client-swag:container {{ConteinerName}}

Will create next file structure:

+-- {{component-name}}
|   -- index.js
|   -- {{compnent-name}}.jsx
|   -- {{compnent-name}}.spec.jsx
|   -- {{compnent-name}}.scss

Smart component with unit test (connected to redux)

Adding --skip-test option will skip test file.

yo client-swag:container {{ConteinerName}} --skip-test

Will create next file structure:

+-- {{component-name}}
|   -- index.js
|   -- {{compnent-name}}.jsx
|   -- {{compnent-name}}.scss

Redux store slice

yo client-swag:redux {{sliceName}}

Will create next file structure:

+-- {{slice-name}}
|   -- {{slice-name}}.reducor.js
|   -- {{slice-name}}.actions.js
|   -- {{slice-name}}.selectors.js
|   -- {{slice-name}}.dispatchers.js

Keywords

FAQs

Last updated on 28 Oct 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc