1.2.0 • Published 3 years ago

create-simple-react v1.2.0

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

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
1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.12.0

3 years ago

0.12.1

3 years ago

0.12.2

3 years ago

0.12.3

3 years ago

0.12.4

3 years ago

0.11.0

4 years ago

0.10.0

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.1

4 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago