🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@toptal/davinci-code

Package Overview
Dependencies
Maintainers
0
Versions
1276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@toptal/davinci-code

Code generation package for frontend applications

2.0.18
latest
Source
npm
Version published
Weekly downloads
220
-50%
Maintainers
0
Weekly downloads
 
Created
Source

@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

  • module: create a new module
  • stories: create a new Storybook stories file
  • new page: create a new page
  • new component: create a new component

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

Keywords

code

FAQs

Package last updated on 24 Sep 2024

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