2.0.15 • Published 13 days ago

@toptal/davinci-code v2.0.15

Weekly downloads
53,799
License
SEE LICENSE IN LI...
Repository
github
Last release
13 days ago

@toptal/davinci-code

Generates code according to davinci folder structure, code and naming guidelines. It simplifies creation of modules, components, pages and other code.

Usage

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

Create module

Creates a new module in /modules directory with the prepared inner structure of the module.

davinci code module module-name

Arguments:

  • module-name - the name of the module to create

Create page component

Creates new React page component in /modules/{module-name}/pages. Used for creating components that will be exposed to the router.

davinci code page pageName moduleName

Arguments:

  • moduleName - name of the destination module
  • pageName - name of the React Page component

Create component

Creates new React component in /modules/{module-name}/components.

davinci code component componentName moduleName

Arguments:

  • moduleName - name of the destination module
  • componentName - name of the React component

Alias

In all the commands you can use davinci-code directly if needed, instead of davinci code. This is not a recommended way to use davinci, but in very rare cases it might be useful.

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
2.0.15

4 months ago

2.0.13

6 months ago

2.0.14

6 months ago

2.0.12

6 months ago

2.0.10

6 months ago

2.0.9

9 months ago

2.0.8

11 months ago

2.0.7

12 months ago

2.0.6

1 year ago

2.0.3

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

1.7.4

1 year ago

1.7.3

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.7.0

1 year ago

1.6.5

1 year ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.5

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.2.0

3 years ago

0.1.3

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0-alpha.19

4 years ago

0.1.0-alpha.18

4 years ago

0.1.0-alpha.17

4 years ago

0.1.0-alpha.16

4 years ago

0.1.0-alpha.15

4 years ago

0.1.0-alpha.14

4 years ago

0.1.0-alpha.13

4 years ago

0.1.0-alpha.12

4 years ago

0.1.0-alpha.11

4 years ago

0.1.0-alpha.10

4 years ago

0.1.0-alpha.9

5 years ago

0.1.0-alpha.8

5 years ago

0.1.0-alpha.5

5 years ago

0.1.0-alpha.4

5 years ago

0.1.0-alpha.3

5 years ago

0.1.0-alpha.2

5 years ago

0.1.0-alpha.1

5 years ago

0.1.0-alpha.0

5 years ago