1.0.6 • Published 11 days ago

generator-neo-react v1.0.6

Weekly downloads
46
License
-
Repository
-
Last release
11 days ago

Neo-react yeoman generator

The neo-react template creates a react app as an enhanced create-react-app project. It includes the neo dependencies, and optionally adds demo pages for reference.

The 2 main types of projects which can be created are:

  • Basic
  • Modular app

Command line

To generate a project without any user input, you can specify the project name after the generator name:

yo neo-react Tuckshop

This will generate a modular app with the default module (Domain).

To specify custom modules, add additional arguments after the name:

yo neo-react Tuckshop Customers Orders Payments

This will create 3 modules. Customers Orders, and Payments

By default, neo services (Reporting, Notifications) will be included. To change this, include -n in the command:

yo neo-react Tuckshop -n

Template development

The code which is called by yeoman to generate the project files is in .\generators\app\index.js.

The template files are in .\generators\app\templates. These files are copied into different locations in the generated project, depending on whether the basic or modular app project type is selected.

Because files may be in different relative locations in the final project, the import paths in the files need to be dynamic. Use template variables for these paths. E.g. AppService.get(<%= typesPath %>.Config).

Variable names

The following variable names are available:

Common:

  • projectName: Name the user types in when creating the project.
  • npmName: Project name with spaces replaced with dashes.
  • codeName: Project name with spaces removed.
  • examples: Boolean indicating whether demo pages must be included.
  • hasModules: Boolean indicating whether this is a modular app project.

Path names:

See code.

Testing

To test your template, run the following command in the project root folder (where this readme file is):

npm link

Then create a folder somewhere, and run yo neo-react as normal.

Hint: If you need to make a change and re-generate, remove everything except the node_modules folder.

1.0.6

11 days ago

1.0.5

14 days ago

1.0.4

1 month ago

1.0.3

1 month ago

1.0.2

1 month ago

1.0.1

2 months ago

1.0.0

2 months ago

0.11.21

2 months ago

0.11.19

11 months ago

0.11.18

11 months ago

0.11.16

1 year ago

0.11.17

1 year ago

0.11.15

1 year ago

0.11.14

1 year ago

0.11.9

2 years ago

0.11.10

1 year ago

0.11.11

1 year ago

0.11.12

1 year ago

0.11.13

1 year ago

0.11.8

2 years ago

0.11.3

2 years ago

0.11.4

2 years ago

0.11.5

2 years ago

0.11.6

2 years ago

0.11.7

2 years ago

0.11.2

2 years ago

0.11.0

2 years ago

0.11.1

2 years ago

0.10.9

2 years ago

0.10.7

2 years ago

0.10.8

2 years ago

0.10.4

2 years ago

0.10.5

2 years ago

0.10.6

2 years ago

0.10.3

3 years ago

0.10.2

3 years ago

0.10.1

3 years ago

0.10.0

3 years ago

0.9.0

3 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago