2.2.0 • Published 4 years ago
rduck v2.2.0
rduck
THIS PACKAGE IS NO LONGER MAINTAINED.
This is a CLI tool that generates React-Redux components based on the Ducks pattern. A basic boilerplate is generated for the component that is specified.
Usage instructions
- Install globally on your machine by running this command: npm install -g rduck
- Open your terminal and navigate to your project's root directory.
- Type rduck -h for an explanation of how to use this CLI.
Options explained
- --directory or -d : This will be the parent directory of where the Duck will be generated. The component name will be the directory that will be generated within the --directory specified.
- --environment or -e : This must be either "web" or "native". Web is for ReactJS and native is for React Native. Defaults to web.
- --redux or -r: true/false. This specifies whether Redux integration should be done. If this option is set to false then only a React component and test will be generated. It defaults to true.
Additional options added in version 2.0.0 and above
- --typescript or -t: This determines whether the generated files must be Typescript compatible or not. Defaults to false.
Example usage
rduck -d ParentDirectoryOfDucks -e web -r true MyFirstReactWebComponentWithRedux
rduck -d ParentDirectoryOfDucks -e native -r false -t true MyFirstReactNativeComponentWithoutRedux