Coder Social home page Coder Social logo

react-app-cli's Introduction

react-app-cli Build Status

Simple create and scraffolding React components and utilities. This cli was created after reading this post So many thanks for idea to David Gilbertson

Preparing

First of all you need to create src folder. It's a start for application sources. For best expirience you may configure aliases for webpack to resolve Components and Utils.

// webpack.config.js
// ...
alias: {
  // ...
  'Components': path.resolve(`${__dirname}/src/components`),
  'Utils': path.resolve(`${__dirname}/src/utils`),
  // ...
}
// ...

After this you can use simple importing in you React application:

import MyTab from 'Components/MyTab';

import myUtil from 'Utils/myUtil';
import { myUtil1, myUtil2 } from 'Utils';

Instalation

npm install -g react-app-components-cli

Usage

cd my-awesome-react-app
mkdir src # if not exists

Configure

rcc config After running config it will create a .rcc-config.json in the root folder. You can edit settings manually in JSON file any time.

Create component

rcc component MyAwesomeComponent

Create utility

rcc util myAwesomeUtil

Main Idea.

When you create a new component, automattically will be created new folder with main JSX file, test and style. Also will de created package.json file inside this dir for best resolving names. The same thing happens when create utility. The difference is that utility is not creates package.json. All utilities are stored in index.js filera

If you have any questions you can contact me via email or telegram

react-app-cli's People

Contributors

dariusnorv avatar

Watchers

James Cloos avatar  avatar

react-app-cli's Issues

Make config.

  • Add custom extensions for components/styles
  • Add styled-components

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.