Giter VIP home page Giter VIP logo

bunny-boilerplate's Introduction

badge

Abandoned ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ
This boilerplate has been abandoned in favour of tools like create-react-app and nwb.

One day this project might be reborn as a wrapper for tools like the two above.

arctichare

Super Quick Boilerplate for Webpack, React & friends.

Avoid configuration.
Use common packages.
Have lovely developer experience.

Get your projects up super quickly with this boilerplate for Webpack, React & friends..

Why? ๐Ÿฐ

Bootstrapping frontend projects is time consuming, and providing consistent developer experience is hard.

The solution is simple... Take choices away. Reduce cognitive overload. Delay fatigue.

In this boilerplate, you aren't given any immediate choices to make. Just run npm start and write code. Wow, quick.

Details

Included Packages

  • react
  • react-dom
  • redux
  • react-redux
  • flux-standard-action

Tooling

  • babel
  • webpack
  • standard
  • css-modules

Particulars

Webpack

Configured almost entirely with hjs-webpack. Includes:

  • hot module replacement
  • css modules
  • import aliases for src directories
  • bundle size visualiser (see Build)
  • see hjs-webpack for details
Aliases

Module aliases have been setup for lib, models, components, styles.

// Example. Always resolves to 'src/models/todos.js'.
import todos from 'models/todos'

Linting

ESLint is using standardjs, with react plugin.

Babel

Babel is using es2015 and stage-0 presets, as well transform-decorators-legacy and react-hmre plugins.

Redux

The files in src/models adhere to ducks. If you're going to use redux selectors, it is also good to define them in the models.

Enabled middlewares:

  • redux-thunk
  • require flux standard actions (see redux-utils.js)
  • add your own in store.js

Redux DevTools extension is supported.

Project Structure

bunny-boilerplate
โ”œโ”€โ”€ public                  # build output
โ””โ”€โ”€ src
	โ”œโ”€โ”€ lib/                # utils
	โ”œโ”€โ”€ models/             # redux ducks
	โ”œโ”€โ”€ components/         # all components
	โ”œโ”€โ”€ styles/             # shared css
	โ””โ”€โ”€ bootstrap.js        # app container
	โ””โ”€โ”€ store.js            # redux store

Build

Development

PORT=3000 npm start

Note: Visit localhost:3000/stats for webpack bundle statistics.

Run 'Tests'

npm run test

Production Build

npm run build

Deploy

Deploying with surge.sh is quick and easy.

See bunny-boilerplate.surge.sh for the demo.

npm install -g surge

npm run build && \
surge --project ./public

Changelog

  • v1.0.0 - initial release

Related Projects

Special Thanks

Thanks to the army of people that made the tools and packages. <3

License

Licensed under the MIT license, (c) 2016 Lochlan Bunn.

--

Bunny is agile and majestic.

bunny-boilerplate's People

Contributors

greenkeeperio-bot avatar loklaan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.