Giter VIP home page Giter VIP logo

pwa-boilerplate's Introduction

PWA Boilerplate

Basic progressive web app boilerplate.

Getting Started

Instalation

npm install or yarn

Usage

Basic express server

node server.js

Basic webpack command to builds files in app folder

webpack

Watches files for changes and uses Browsersync plugin to proxy express server.

webpack -w

** Start express server and run webpack watch to begin development. **

Structure

Development

src/
    components/
        Header/
            Header.js
            Header.scss

    App.js
    App.scss

    index.js
    index.scss

    sw.js

    manifest.json

postscss.config.js
sw-precache.config.js
webpack.config.js

server.js
  • components - Contains example header component
    • Header
      • Header.js - Basic React component with header element and nested title
      • Header.scss - Styles for header component
  • App.js - App component with nested Header
  • App.scss - App styles, non component specific
  • index.js - Script file to manage imports and reference for Webpack entry point
  • index.scss - Default styles, non app specific
  • sw.js - Imported by sw-precache.config.js for custom sw-toolbox routing.
  • manifest.json - Web App manifest, copied over to app on build
  • postscss.config.js - Autoprefixer configuration
  • sw-precache.config.js - SW-Precache configuration
  • webpack.config.js - Webpack configuration
  • server.js - Express server

Production

app/
    static/
        images/
            ...
        scripts/
            ...
        styles/
            ...

    index.html

    manifest.json

    service-worker.js

Technologies

  • Webpack - Build system for all files
  • Babel - JavaScript polyfill
  • SASS - CSS pre-processor
  • PostCSS - Autoprefixer on CSS files
  • SW Precache - Service worker library used to cache files
  • Browsersync - Development proxy server
  • React - Interface building library
  • Express - Backend server

pwa-boilerplate's People

Contributors

stefanpiazza 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.