npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-awesome-scripts

v0.2.12

Published

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

Downloads

3

Readme

⚡ react -super-scripts

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

⚠️ This is 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 by setting dashboard as false in react_super_script in package.json
       {
           ...
      
            "react_super_scripts": {
       	  "dashboard": false
            }
       }
  • Faster builds
    • added happyloader (pre configured).
    • you can enable it by setting webpackCache as true in react_super_script in package.json
      {
     	...
    
     	"react_super_scripts": {
     		"webpackCache": 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
  • Offline Plugin
    • You can generate service worker for your web app, simply by adding offline to true in react_super_script in package.json
       {
           ...
      
            "react_super_scripts": {
       	  "offline": true
            }
       }
    • Note: You would also need to require offline plugin in your app entry point. it is always recommended to do so for production build. At the end of your app entry file just add these lines of code.
       // src/index.js
           ...
      
            if (process.env.NODE_ENV === 'production') {
                 require('offline-plugin/runtime').install();
            }
      

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 port

    • You can specify custom port for running development server.
    • In your package.json specify the port number to port property of react_super_scripts field. Your package.json should look like
       {
           ...
      
            "react_super_scripts": {
       	  "port": 3000
            }
       }
      a default port (3000) is already provided in package.json.
    • Note: if you have specified PORT in your environment variable then environment variable will override your custom port from package.json. Also if you don't provide port in your package.json and nor in your environment variable it will default to 3000.
  • 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
  • Custom development browser

    • You can specify your browser for automatically running during development.
    • In your package.json specify the browser to defaultBrowser property of react_super_scripts field. Your package.json should look like
       {
           ...
      
            "react_super_scripts": {
       	  "defaultBrowser": "firefox"
            }
       }
    • The available options are chrome, firefox, safari (OSX/macOS only) and ie (windows only). You can also specify it as "none", if you don't want any browser to be running.
    • Note: If you provide a browser that is not available on your system it will not run any browser
  • Want moarrr ?

Plans

  • Support this fork to be always in sync with create-react-app and react-scripts
  • Add boilerplate generator options
    • Give user choice to generate basic app (like the one now) or generate app with redux and react-router