@lcooper/create-app

0.0.3 • Public • Published

@lcooper/create-app

npm license

A tool to generate React apps with no configuration. Inspired by create-react-app

Usage

Use npx:

npx @lcooper/create-app new-app

Or install globally:

npm i @lcooper/create-app -g

Then run:

create-app new-app

File Structure

Running either of the above commands will create a directory called new-app inside the current working directory, and generate the following initial project structure:

new-app
├── .gitignore
├── app.config.js
├── LICENSE
├── package.json
├── node_modules
└── src
    ├── .eslintrc.js
    ├── index.html
    ├── index.js
    └── index.scss

If a single page appliation meets your needs, get started by editing:

  • src/index.js - the javascript entry point for your app
  • src/index.html - the page template for your app

To configure a multi page application, you'll have to edit the app.config.js file. More information can be found here.

Scripts

The following scripts are included in each new app:

build

Run using npm run build or yarn build.

Builds the app in production mode into an output folder named dist. Files are minified and file names are hashed.

dev

Run using npm run dev or yarn dev.

Runs the app in development mode using a development server that runs on port 3000 by default.

Errors and warnings will be displayed in the console, and shown in the browser via an error overlay.

react-refresh is integrated via @pmmmwh/react-refresh-webpack-plugin.

Related

@lcooper/app-scripts - App scripts and configuration.
@lcooper/webpack-messages - Webpack error and warning message formatter.
@lcooper/dev-server - Development server with HMR.
@lcooper/dev-overlay - Overlay that displays errors and warnings in the browser.

Readme

Keywords

Package Sidebar

Install

npm i @lcooper/create-app

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

25.8 kB

Total Files

18

Last publish

Collaborators

  • lcooper