Socket
Socket
Sign inDemoInstall

create-simple-react

Package Overview
Dependencies
4
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    create-simple-react

alternative to create-react-app / no eject, Keep It Simple, opinionated for shop standard


Version published
Weekly downloads
7
decreased by-41.67%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

create-simple-react

A "Quick Start" for React on the frontend and NodeJS on the backend. An alternative to other ways to start a React project. This will create a project ready for production or a play area to trry out React.

Creating a new Project

npm init simple-react [New Project Directory] {--verbose} {--help}

Example

cd ~/projects
npm init simple-react@latest lab-status

-OR-

cd ~/projects
npx create-simple-react@latest lab-status

3 minutes later...

cd lab-status
npm start

open a browser to http://localhost:8080


There is no ejecting !!

This project was ruled by these concepts:

  1. K.I.S.S. -- Keep It Sublimely Simple
  2. D.R.Y. -- Don't Repeat Yourself
  3. Everything in plain sight
  4. React Frontend, NodeJS backend example
  5. Project structure near ready for Production (just change webpack config from development to production, add minifiy)

Please send ideas on improvements

ReleaseNew features
Version 0.6.1Example code for both React Class and React Hooks (Jest test examples too!)
Version 0.9.0Upgraded to Webpack 5
Version 0.10.0Tested with older version of NodeJS
Version 1.0.0NodeJS 16, npm 8,
Version 1.1.0Added TailwindCSS support

Current Stack

LayerVersion
NodeJS16.14.0
Express4.17.3
React17.0.2

Project Tools

LayerVersion
npm8.5.0
Webpack5.69.1
Babel7.16.x
dotEnv16.0.0
PostCSS8.4.6
TailwindCSS3.0.23
  • send email to martin.a.jackson@gmail.com on earlier or later versions mention your platform
    • Ubuntu 18.04, 20.04, RaspberryPi 3/4, Mac OS, Win10 1803/1909
    • we will put the list here

for those you want to tinker ...

the config files are in the root directory with the package.json file. If you mess them up, you have two choices:

  • use git to revert back
  • remove the messed up files and run create-simple-react on the same directory again. It will restore the original config files. Note: create-simple-react will not replace existing files

What you get out of the box

Project Scripts

npm run start

runs the application is Live Reload where as you save code code in src/,
you will see the changes on the web page http://localhost:8080

npm run build

creates a bundle.js in the public/ ready to test before publishing on a production server.

npm run demo

tests the production files public/ on last time before publishing.

npm run test

run the Jest Unit tests in the test directory

npm run lint

runs ESLint against all your source code -- catch syntax errors early
Your project directory
package.jsonThe file where NPM keeps all the details to build or run your project
.eslintrc.jsdefault configuration for ESLint
.gitignorewhich files not to include in version tracking
babel.config.jsconfiguration file for Babel to support React and JSX
webpack.config.jsconfiguration file for Webpack to support Babel, React, and JSX
node_modulesdirectory where NPM puts modules your project uses
publicdirectory where production bundle of your code will go
srcdirectoy of your modules source code in JSX and ES2018
src/index.htmlweb page to launch your React Application
src/index.jsTop App Module
src/Example.jsAn example React Component used by index.js
testdirectory for your Jest unit tests
serveran example NodeJS server as a backend for your React frontEnd

Further Study

Where is all started ReactJS

Wes Bos' React for Beginner

Elija Manor's Article on npm initializers <-- great article!!

Other npm init examples

  • create-deck - Create mdx-deck presentations

    npm init deck your-app-name
    
  • create-component-app - Tool to generate different types of React components from the terminal. 💻

    npm init component-app
    
  • create-hintrc - 💡 A hinting engine for the web https://webhint.io/

    npm init hintrc
    
  • create-esm - Create esm enabled packages

    npm init esm
    

Keywords

FAQs

Last updated on 09 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc