New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generator-homebase

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-homebase

generators for workclout homebase codebase

0.2.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

generator-homebase NPM version Build Status Dependency Status

generators for workclout homebase codebase

Installation

First, install Yeoman and generator-homebase using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-homebase

Templates

Component generator

Generates a function component in src/components with the following features:

  • Simple Card component with some info and click event.
  • All typescript annotations needed for props and component.
  • styled file for you styled-components and rebass components.
  • Storybook example ready to be consumed by storybook
  • tests file for unit tests. It contains 4 basic unit test that should pass for the generated components
  • i18next internationalization example via useTranslation

To run inside the app project run

npm run generate:component

To run via yeomen

yo homebase:component

note: you will be promot to enter a component name. Please enter CamelCase name for the template to work.

note: This generator doesn't have an option to generate a class component since we now have react hooks there is no need for class components.

Dev

Local development on existing template.

  • git clone git@github.com:workclout/generators.git
  • run npm link
  • link package in app project via npm link generator-homebase
  • run npm run generate:${template name} script.

Add a new template

  • create a new folder inside generators with the name of your template.
  • create index.js with yeomen class. (checkout generators/component generator)
  • create your templates in generators/${generator name}/templates.

Publish

to publish you need to:

  • Increase the package version in package.json
  • Run npm publish
  • Install package in your project with npm i -D generator-homebase@latest

Future work

  • add options for styled/i18next.
  • add templates to generate scenes.
  • semantic releases and publish package on commit to master

License

© ilaiwi

Keywords

yeoman-generator

FAQs

Package last updated on 10 Oct 2019

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