项目作者: moebiusmania

项目描述 :
A minimal starter kit for React with Webpack, Typescript, SASS & CSS Modules.
高级语言: JavaScript
项目地址: git://github.com/moebiusmania/react-minimal.git
创建时间: 2018-03-16T20:38:18Z
项目社区:https://github.com/moebiusmania/react-minimal

开源协议:MIT License

下载


Why it is archived?

This repo was originally my personal React “starting kit” that I’ve used internally within companies for a couple of years since 2017 and then moved here to Github, Create React App was in its very early stages and creating a custom boilerplate repo for React was quite a common task.

Today isn’t the case anymore since CRA has grown way better and alternative tools like Vite are even better suited for small and performant webapps.

So this repo is now quite a relic of that time, still useful if you want to see how to configure React and Webpack from scratch… but nothing more!


react-minimal

A minimal starter kit for React with Webpack, Typescript, SASS & CSS Modules.

./logo.png

As the name says, this is another React starter kit created to give the minimum-viable-configuration to get started a new React based project with less dependencies and boilerplate as possible.

Developed mainly for me 😎 but open to everyone who may find this useful.

  • React & React DOM
  • Typescript
  • Webpack
    • HTML plugin
  • SASS & normalize.css
  • Styles loaded as CSS Modules
  • gh-pages (publish)

Get started

A few steps to quick-start a new project:

Clone the repo on a new folder

  1. $ git clone https://github.com/moebiusmania/react-minimal my-project

Change the name in the package.json, this will also affect the HTML title and the Webpack’s notifications:

  1. ...
  2. "name": "my-project"
  3. ...

then

  1. $ npm ci

to install dependencies, and

  1. $ npm start

to start webserver on localhost:3000

Build & publish

To create deployable static files in the ./dist folder:

  1. $ npm run build

to deploy the ./dist folder as a Github page:

  1. $ npm run deploy

Styles

This starter kit supports both regular CSS and SASS, with a little difference in how they are managed:

  • .css files are handled as regular CSS.
  • .scss files are loaded as CSS modules, this is a best fit for components.

Changelog

Check the releases page to get updated on what changed in the latest version.

License

Released under the MIT license.