Giter Club home page Giter Club logo

webdash-workbox's Introduction

webdash workbox

Webdash workbox helps you generate a service worker using Workbox.

npm install --save-dev webdash-workbox

Workbox preview

Features

  • One-click install if workbox-cli is not installed
  • Wizard asks you questions with smart defaults
  • Shows stats about your existing service worker
  • Beginner friendly

webdash-workbox's People

Contributors

jadjoubran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

webdash-workbox's Issues

Show service worker stats

  • Reads workbox-config and checks whether service-worker file is generated or not
  • Number of pre-cached assets

Design & UX fixes

  • Change button text to Installing workbox
  • White border for unchecked

init endpoint

Returns whether there's a workbox configuration or not

if there's a configuration, then we'll query another endpoint to show stats about workbox & service worker.
if there's no configuration, then we'll show a button that can start the generator

Also returns whether workbox is installed in project or not (#2)

Generate configuration

When #1 returns false (as in there's no workbox configuration already)

Sample workbox configuration that we're aiming for:

module.exports = {
  "globDirectory": "build/default",
  "globPatterns": [
  "**/*.{html,js,png,xml,ico,svg,json}",
  ],
  "globIgnores": [
  "bower_components/**"
  ],
  "swDest": "build/default/service-worker.js"
};
  1. Ask for globDirectory & suggest default
  2. Ask for globPatterns (independent from previous answer)
  3. Check for common globIgnores in globDirectory (depends on 1.)
  4. Suggest swDest based on globDirectory (depends on 1.)
  5. Pass data to api and generate configuration + create workbox-config.js

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.