LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pwa

Build installable offline web applications

TLDR

Create PWA project
$ pwa create [my-app]
copy
Build PWA
$ pwa build
copy
Start development server
$ pwa dev
copy
Generate service worker
$ pwa sw
copy

SYNOPSIS

pwa command [options]

DESCRIPTION

PWA (Progressive Web App) tools help create web applications that work offline, can be installed, and behave like native apps. Various CLI tools exist for PWA development.This covers common PWA CLI patterns. Specific tools vary.

MANIFEST EXAMPLE

$ {
  "name": "My App",
  "short_name": "App",
  "start_url": "/",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#000000",
  "icons": [
    {
      "src": "/icon-192.png",
      "sizes": "192x192",
      "type": "image/png"
    }
  ]
}
copy

SERVICE WORKER

$ // Basic service worker
self.addEventListener('install', (e) => {
  e.waitUntil(
    caches.open('v1').then(cache =>
      cache.addAll(['/'])
    )
  );
});

self.addEventListener('fetch', (e) => {
  e.respondWith(
    caches.match(e.request)
      .then(r => r || fetch(e.request))
  );
});
copy

CAVEATS

HTTPS required for service workers. Browser support varies. Tools differ by framework.

HISTORY

PWAs were introduced by Google in 2015 as a way to deliver app-like experiences through web technology.

SEE ALSO

lighthouse(1), vite(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid