MattKohnen / storybook-react-bootstrap-4-sass

forked from MattKohnen/react-bootstrap-4-sass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contents

  1. Introduction
  2. Requirements
  3. Available Commands
    a. yarn test
    b. yarn storybook
    c. yarn start
    d. yarn build-storybook
    e. yarn build
  4. Bootstrap
    a. Overwriting Bootstrap Sass Variables
    b. Using / Extending Bootstrap Components
  5. Misc
    a. Component / Directory Structure
    b. Mini Style Guide

Introduction

A React project with Storybook, Bootstrap v4, Sass, linting, live reloading, concatenation, minification, sourcemaps, and more:

  • React, JSX, ES6, TypeScript and Flow syntax support.
  • Language extras beyond ES6 like the object spread operator.
  • Autoprefixed CSS, so you don’t need -webkit- or other prefixes.
  • A fast interactive unit test runner with built-in support for coverage reporting.
  • A live development server that warns about common mistakes.
  • A build script to bundle JS, CSS, and images for production, with hashes and sourcemaps.

Requirements

  1. nodejs with npm
  2. Install All Node Packages
    yarn install (or npm install) from the project root.

Available Commands

yarn test

(or npm test)

Launches the test runner in the interactive watch mode.

See the section about running tests for more information.

yarn storybook

(or npm run storybook)

Storybook should start, on a random open port in dev-mode.

Now you can develop your components and write stories and see the changes in Storybook immediately since it uses Webpack’s hot module reloading.

yarn start

(or npm start)

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn build-storybook

(or npm run build-storybook)

Outputs a static Storybook in the storybook-static directory.

See the docs for more information.

yarn build

(or npm run build)

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Bootstrap

Overwriting Bootstrap Sass Variables

You can leverage Bootstrap Sass in 3 different ways, via the src/styles/1-vendor-overrides/bootstrap-overrides directory:

  1. You can overwrite specific Bootstrap Sass variables via _override-defaults.scss
  2. You can extend existing Bootstrap classes with new classes via _extend-classes.scss
  3. You can use Bootstrap mixins via _use-mixins.scss

Look inside of each of the above 3 files for examples.

Using / Extending Bootstrap Components

Misc

Component / Directory Structure

[ TODO ]

Mini Style Guide

[ TODO ]

About

forked from MattKohnen/react-bootstrap-4-sass

License:MIT License


Languages

Language:JavaScript 69.9%Language:CSS 21.4%Language:HTML 8.7%