Socket
Socket
Sign inDemoInstall

@toptal/davinci-code

Package Overview
Dependencies
4
Maintainers
1
Versions
1209
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@toptal/davinci-code

Code generation package for frontend applications


Version published
Weekly downloads
445
decreased by-19.68%
Maintainers
1
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 20 May 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc