Skip to content

progressive-amber/react-amber-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reactive-amber

Reactive Amber CLI

This is a development tool for quickly scaffolding Amber apps using the Reactive Amber recipe for the framework.

Installation

To run the Reactive Amber CLI, you will need to have first created and Amber project using the Reactive Amber recipe.

amber new <project-name> -r seanwatters/reactive-amber

cd <project-name>

From here, you will need to install the dependencies, including the Reactive Amber CLI:

npm install

You can now use the tool. A script has been written into your projects, package.json file that will run the node frontend-react/dev/react-tools.js command for you.

npm run react-tools

// alternatively
node react-frontend/dev/react-tools.js

Usage

Now that the tool is installed, when you run npm num react-tools, you will be prompted with the following:

? Select Generator
> componenet
> scaffold
> api

Selecting component will prompt you to enter the component name, props and state. (state and props are not currently functional, but will be soon):

? Select Generator component
? Component Name: NewComponent
? Component State: <component-state>
? Component Props: <component-props>

This will generate a file in the frontend-react/src/components/:

|- frontent-react
    |- dev
    |- src
       |- components
           |- NewComponent   // generated component
               |- index.css
               |- index.js
    |- index.css
    |- index.js

keep in mind that this is not a substitution for React devtools, but is a suplimental tool for development with Reactive Amber.

License

This project is licensed under the MIT License - see the LICENSE file for details