Git Product home page Git Product logo

refresh-template-project's Introduction

Refresh Template - React App

Commitizen friendly

Add styled-components, routing, storybook and a sensible project structure to the create-react-app boilerplate.

View it live here.

Tech Stack

frontend
view library react
styling styled-components
boilerplate create-react-app
documentation storybook

Requirements

You will need the following software installed on your machine:

We recomend installing node throught nvm, as well as updating npm to version >=5.

Getting started

You can setup a new project based on this boilerplate using Yeoman.

First, install Yeoman and generator-refresh using npm.

npm install -g yo
npm install -g generator-refresh

Then generate your new project:

yo refresh <my-project>

Navigate to the root of the project and install the dependencies:

cd <my-project>
npm i

Once the dependencies are installed, you can launch the development environment and have a look at the boilerplate application:

npm run start

This will launch the webpack dev server for you and automatically sync your browser. You can now view the website on localhost:3000.

Scripts

A set of scripts are provided for you to test, build and analyze the project.

Storybook

With storybook you can view the components you have created in isolation. To view them, simply run:

npm run storybook

To include a component to the storybook, simply add a <componentName>.stories.js file in your component folder, containing the stories you want to show.

Test

You can run all tests in the project with the following command:

npm run test

You can also generate a website with information on the code coverage with:

npm run test -- --coverage

This will generate a website in the folder coverage. You can launch it with any server of your choice, for example serve.

npm i -g serve && serve coverage

Build

You can build a production ready version of the website by running:

npm run build

This will create a build folder with the minimized and transpiled JS.

Dependency map

You can generate a map of all dependencies, this can be very usefull when trying to identify a library causing bloat to the application. After building your application you can generate a map, by running:

npm run analyze

This will look into your build folder and open an interactive map of the dependencies in your browser.

License

MIT

refresh-template-project's People

Contributors

au-re avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.