hirako2000 / polypack

πŸ”₯ Polypack - Webpack build stack with focus on performance πŸ”₯

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codacy Badge Build Status Dependency Status devDependency Status license

polypack

Polypack is a boilerplate configuration to build the most lightweight front end assets for webapp or static pages.

The motivation behind this project started from observation that most if not all boilerplates are either bloated with heavyweight libs, or incomplete in order to develop and ship production applications.

Features

  • Ready to use build and bundling system with webpack
  • Most lightweight libraries for performance
  • Web application, react-like skeleton
  • State store
  • Static web page setup
  • Support for either or both {less}/Sass
  • Support for various web fonts formats
  • Hot Module Replacement for rapid development
  • ES6/7
  • Linting
  • Production build with minified, concat and gzipped content

Roadmap

  • Base bundler with webpack 3 & Babel
  • Multi SPA bundler config
  • Hot Module Reload
  • Production build
  • Cross environment variables
  • Gzip
  • Less support
  • Sass support
  • Fonts support
  • Inferno JS skeleton
  • Redux skeleton
  • PureCSS skeleton
  • mincss skeleton
  • Inferno sample webapp
  • Linter
  • Jest

TV program roll webapp example with Inferno/redux & mincss

HBO look & feel with Mincss

Live Demo

top mid

Size

                                  Asset       Size  Chunks                    Chunk Names
   bcff9e9b7b53122acb52df67cd5f4d4f.svg    1.99 kB          [emitted]         
                               photo.js    14.6 kB       0  [emitted]         photo
                        photo.vendor.js     114 kB       4  [emitted]         photo.vendor
                              photo.css    3.97 kB       0  [emitted]         photo
                       photo.vendor.css    1.95 kB       4  [emitted]         photo.vendor
                             photo.html  398 bytes          [emitted]

Size (gzipped)

bcff9e9b7b53122acb52df67cd5f4d4f.svg.gz  901 bytes          [emitted]         
                            photo.js.gz    2.88 kB          [emitted]     
                     photo.vendor.js.gz    27.9 kB          [emitted]
                           photo.css.gz    1.32 kB          [emitted]
                    photo.vendor.css.gz  850 bytes          [emitted]                                           
                             photo.html  398 bytes          [emitted]   

Potato shop

Landing page with Inferno & Basscss

Live Demo | Source

Size

                               Asset       Size  Chunks             Chunk Names
                    potatoes.css.map   89 bytes       0  [emitted]  potatoes
                         potatoes.js    21.9 kB       0  [emitted]  potatoes
                  potatoes.vendor.js    51.4 kB       1  [emitted]  potatoes.vendor
                        potatoes.css    4.65 kB       0  [emitted]  potatoes
                 potatoes.vendor.css    9.89 kB       1  [emitted]  potatoes.vendor
             potatoes.vendor.css.map   96 bytes       1  [emitted]  potatoes.vendor
                          index.html  418 bytes          [emitted]  

Size (gzipped)

                               Asset       Size  Chunks             Chunk Names
                      potatoes.js.gz    3.09 kB          [emitted]  
                     potatoes.css.gz    1.98 kB          [emitted]  
              potatoes.vendor.css.gz    2.31 kB          [emitted]  
               potatoes.vendor.js.gz    15.4 kB          [emitted]  
                          index.html  418 bytes          [emitted]  

Folder structure

.
β”œβ”€β”€ src                          # Applications source code
β”‚   β”œβ”€β”€ inferno                  # Inferno app
β”‚   β”‚   β”œβ”€β”€ components           # Components
β”‚   β”‚   β”œβ”€β”€ styles               # Styles
β”‚   |   β”œβ”€β”€ index-template.html  # HTML template
β”‚   |   └── index.js             # Entry point
β”‚   β”œβ”€β”€ mincss                   # Mincss landing page
β”‚   β”‚   β”œβ”€β”€ img                  # images
β”‚   β”‚   β”œβ”€β”€ styles               # Styles
β”‚   |   β”œβ”€β”€ index-template.html  # HTML template
β”‚   |   └── index.js             # Entry point
β”‚   β”œβ”€β”€ photo                    # Inferno app for TV roll example
β”‚   β”‚   β”œβ”€β”€ components           # Components
β”‚   β”‚   β”œβ”€β”€ img                  # Images
β”‚   β”‚   β”œβ”€β”€ styles               # Styles
β”‚   |   β”œβ”€β”€ index-template.html  # HTML template
β”‚   |   └── index.js             # Entry point
β”‚   └── purecss                  # Purecss landing page
β”‚       β”œβ”€β”€ img                  # images
β”‚       β”œβ”€β”€ styles               # Styles
β”‚       β”œβ”€β”€ index-template.html  # HTML template
β”‚       └── index.js             # Entry point
β”œβ”€β”€ static                       # Output of prod assets
└── webpack.config.js            # Webpack config for both dev and prod builds

HOWTO

Simply fork, or download the zip content of this repo.

Prerequisite

  • Node.js

Run

npm install # installs deps
npm start # starts the app in dev mode
npm run build # builds app for production

Browse

There are multiple web apps built by default

Contributing

PR are welcome

About

πŸ”₯ Polypack - Webpack build stack with focus on performance πŸ”₯

License:MIT License


Languages

Language:JavaScript 49.7%Language:HTML 26.3%Language:Less 23.5%Language:CSS 0.5%