@toptal/davinci-code

2.0.16 • Public • Published

@toptal/davinci-code

Generates code that is compliant with the Frontend Architecture Guidelines. It simplifies creation of modules, components, pages and other code.

Usage

Use it by installing yarn add @toptal/davinci-code in your project.

Commands

Custom templates

To use a custom template from your project to generate components, pages or other files you just need to create those templates following the next format and file paths:

/your-project-root
   /_templates
      /templateName
         /new
            ...hygen template files

Important! You have to keep the structure and the folder names _templates and new are important. templateName will be replaced with your template name, ex. SearchPage, ContentComponent, etc. new folder is a required directory for storing template files.

All the hygen template files have a format of hygen templates.

To create a component from your custom template execute the command:

davinci-code templateName componentName moduleName

Arguments:

  • templateName - name of the custom template
  • moduleName - name of the destination module
  • componentName - name of the React component

IDE Tooling

This package can be used directly in your IDE through these extensions

Package Sidebar

Install

npm i @toptal/davinci-code

Weekly Downloads

4,078

Version

2.0.16

License

SEE LICENSE IN LICENSE.MD

Unpacked Size

42.7 kB

Total Files

41

Last publish

Collaborators

  • talbot