Generate react project directories and files based on your components.
using npm
$ npm i -D reactry
using yarn
$ yarn add --save-dev reactry
- setup your project using
create-react-app
(recommended) - add
reactry.config.js
to your project root directory - run
npx reactry
to generate your component files
reactry.config.js
exports a components
object of this structure:
// ./reactry.config.js
module.exports = {
components: {
desktop: [],
tablet: [],
mobile: [],
util: []
}
};
components.desktop
- astring[]
of components specific to the desktop version of the projectcomponents.tablet
- astring[]
of components specific to the tablet version of the projectcomponents.mobile
- astring[]
of components specific to the mobile version of the projectcomponents.util
- astring[]
of utility components which span multiple devices