Giter Site home page Giter Site logo

ali-aka-ahmed / react-super-scripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shrynx/react-super-scripts

1.0 1.0 0.0 3.59 MB

adds super powers to create-react-app and allows custom configs without ejecting.

Home Page: https://react-super-scripts.netlify.com

License: Other

JavaScript 69.84% AppleScript 1.77% HTML 1.43% CSS 1.13% Shell 25.83%

react-super-scripts's Introduction

⚡ react -super-scripts

This package adds super powers and allows custom configs without ejecting Create React App

⚠️ This is not a fork of create-react-app, it is just a fork of react-scripts.

Create bootstraped React apps simply by

create-react-app my-app --scripts-version react-super-scripts

* If you don't have Create React App, then npm -g install create-react-app

Features

Apart from features provided by CRA, this package adds more goodies listed below.

Webpack

  • Webpack Dasboard
    • you got to love webpack dashboard
    • Webpack dashboard is turned on by default,but it is configurable
    • you can disable it able it setting dashboard as false in react_super_script in package.json
      {
        ...
    
        "react_super_scripts": {
          "dashboard": true
        }
      }
  • Hot module replacement
    • supports HMR for js files too.
  • Supports SASS and LESS
    • write styles in css, sass or less
  • Webpack image loader
    • for compressing images
  • Vendor splitting
    • you can split out vendor files from app logic, simply by creating a vendor.js file in src folder, and import all your vendor dependencies in that file.
  • Build Progress Bar
    • During build process a progress bar is shown.

Babel

  • Custom babel config
    • Want to use latest and greatest of javascript, no worries include custom babel presets by installing packages and adding them to .babelrc in root directory of the app
    • Note: This will completly override existing presets. You will need to create the .babelrc file inside your app folder and remember to add react-hmre preset to babel development. This script relies on react-hmre for hot module replacement.

ESLint

  • Custom eslint config
    • Not happy with the default linting rules, simply include custom eslint by installing packages and adding them to .eslintrc in root directory of the app
    • Note: This will completly override existing linting rules. You will need to create the .eslintrc file inside your app folder.

Preact

  • Using preact instead of react

    • Preact is a fast, 3kB alternative to React, with the same ES2015 API,
    • In your package.json add usePreact to react-super-scripts and set it to true. Your package.json should look like
      {
        ...
    
        "react_super_scripts": {
          "usePreact": true
        }
      }

    Then uninstall react and react-dom and install preact and preact-compat

    npm uninstall react react-dom && npm install --save preact preact-compat

    • You can keep using you existing react code without any changes, under the hood webpack will alias react and react-dom to use preact.
    • Note: This package uses preact-compat for maintaining compatibility with react. This doesn't guarantee complete compatibility, test all features fully first.

Others

  • Custom entry point
    • You can specify app entry point for webpack.
    • In your package.json specify the file path to appEntry property of react_super_scripts field. Your package.json should look like
      {
        ...
    
        "react_super_scripts": {
          "appEntry": "src/index.js"
        }
      }
    a default entry point (src/index.js) is already provided in package.json.
    • Note: if you don't provide appEntry in your package.json it will default to scr/index.js

react-super-scripts's People

Contributors

anilreddykatta avatar bebbi avatar dceddia avatar eanplatter avatar enoahnetzach avatar existentialism avatar fson avatar gaearon avatar gaumala avatar hnordt avatar insin avatar johann-sonntagbauer avatar keyz avatar koistya avatar kripod avatar lacker avatar mareksuscak avatar mxstbr avatar n3tr avatar nhajidin avatar pd4d10 avatar ro-savage avatar ryansully avatar shrynx avatar sidoshi avatar timer avatar tuchk4 avatar valscion avatar viankakrisna avatar vjeux avatar

Stargazers

 avatar

Watchers

 avatar

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.