survos / pwa-extra-bundle
Extra tools for https://github.com/Spomky-Labs/phpwa
Fund package maintenance!
kbond
Installs: 429
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.1
- spomky-labs/pwa-bundle: *
- survos/core-bundle: ^1.5.378
- symfony/asset-mapper: ^6.4 || ^7.0
- symfony/config: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
- twig/twig: ^3.4
Requires (Dev)
- phpstan/phpstan: ^1.10
- symfony/browser-kit: ^6.4 || ^7.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/phpunit-bridge: ^6.4 || ^7.0
- symfony/twig-bundle: ^6.4 || ^7.0
- symfony/var-dumper: ^6.4 || ^7.0
- zenstruck/console-extra: ^1.4
- dev-main
- 1.5.378
- 1.5.377
- 1.5.376
- 1.5.375
- 1.5.374
- 1.5.373
- 1.5.372
- 1.5.371
- 1.5.370
- 1.5.369
- 1.5.368
- 1.5.367
- 1.5.366
- 1.5.365
- 1.5.364
- 1.5.363
- 1.5.362
- 1.5.361
- 1.5.360
- 1.5.359
- 1.5.358
- 1.5.357
- 1.5.356
- 1.5.355
- 1.5.354
- 1.5.353
- 1.5.352
- 1.5.351
- 1.5.350
- 1.5.349
- 1.5.345
- 1.5.344
- 1.5.343
- 1.5.342
- 1.5.341
- 1.5.340
- 1.5.339
- 1.5.338
- 1.5.337
- 1.5.336
- 1.5.335
- 1.5.334
- 1.5.333
- 1.5.332
- 1.5.331
- 1.5.330
- 1.5.329
- 1.5.328
- 1.5.327
- 1.5.326
- 1.5.325
- 1.5.324
- 1.5.323
- 1.5.322
- 1.5.321
- 1.5.320
- 1.5.319
- 1.5.318
- 1.5.317
- 1.5.316
- 1.5.315
- 1.5.314
- 1.5.313
- 1.5.312
- 1.5.311
- 1.5.310
- 1.5.309
- 1.5.308
- 1.5.307
- 1.5.306
- 1.5.305
- 1.5.304
- 1.5.303
- 1.5.302
- 1.5.301
- 1.5.300
- 1.5.299
- 1.5.298
- 1.5.297
- 1.5.296
- 1.5.295
- 1.5.294
- 1.5.293
- 1.5.292
- 1.5.291
- 1.5.290
- 1.5.289
- 1.5.288
- 1.5.287
- 1.5.286
- 1.5.285
- 1.5.284
- 1.5.283
- 1.5.282
- 1.5.281
- 1.5.280
- 1.5.279
- 1.5.278
- 1.5.277
- 1.5.276
- 1.5.275
- 1.5.274
- 1.5.273
- 1.5.272
- 1.5.271
- 1.5.270
- 1.5.269
- 1.5.268
- 1.5.267
- 1.5.266
- 1.5.265
- 1.5.264
- 1.5.263
- 1.5.262
- 1.5.261
- 1.5.260
- 1.5.259
- 1.5.258
- 1.5.257
- 1.5.256
- 1.5.255
- 1.5.254
- 1.5.253
- 1.5.252
- 1.5.251
- 1.5.250
- 1.5.249
- 1.5.248
- 1.5.247
- 1.5.246
- 1.5.245
- 1.5.244
- 1.5.243
- 1.5.242
- 1.5.241
- 1.5.240
- 1.5.239
- 1.5.238
- 1.5.237
- 1.5.236
- 1.5.235
- 1.5.234
- 1.5.233
- 1.5.232
- 1.5.231
- 1.5.230
- 1.5.229
- 1.5.228
- 1.5.227
- 1.5.226
- 1.5.225
- 1.5.224
- 1.5.223
- 1.5.222
- 1.5.221
- 1.5.220
- 1.5.219
- 1.5.218
- 1.5.217
- 1.5.216
- 1.5.215
- 1.5.214
- 1.5.213
- 1.5.212
- 1.5.211
- 1.5.210
- 1.5.209
- 1.5.208
- 1.5.207
- 1.5.206
- 1.5.205
- 1.5.204
- 1.5.203
- 1.5.202
- 1.5.201
- 1.5.200
- 1.5.199
- 1.5.198
- 1.5.197
- 1.5.196
- 1.5.195
- 1.5.194
- 1.5.193
- 1.5.192
- 1.5.191
- 1.5.190
- 1.5.189
- 1.5.188
- 1.5.187
- 1.5.186
- 1.5.185
- 1.5.184
- 1.5.183
- 1.5.182
- 1.5.181
- 1.5.180
- 1.5.179
- 1.5.178
- 1.5.177
- 1.5.176
- 1.5.175
- 1.5.174
- 1.5.173
- 1.5.172
- 1.5.171
- 1.5.170
- 1.5.169
- 1.5.168
- 1.5.167
- 1.5.166
- 1.5.165
- 1.5.164
This package is auto-updated.
Last update: 2024-11-04 17:03:21 UTC
README
This bundle is a playground for ideas to improve https://github.com/Spomky-Labs/phpwa
The idea is that after these tools are developed they'll be incorporated into that the core bundle and this one won't be necessary.
Extra Features
Before generating the initial configuration, generate the icons. Yes, this is a bit of a pain, but it's a requirement for the manifest. A manifest is required to run offline.
composer req symfony/ux-twig-component
<twig:PwaInstall> <twig:block name="launch"> Lauch button here... </twig:block> <twig:block name="install"> <twig:button variant="success"> Install as PWA </twig:Button> </twig:block> </twig:PwaInstall>
To generate the initial PWA Yaml configuration, run
bin/console survos:pwa:config
To create screenshots!!
composer req symfony/mime symfony/filesystem symfony/panther composer require --dev dbrekelmans/bdi vendor/bin/bdi detect drivers symfony server:status bin/console pwa:create:screenshot https://127.0.0.1:8001/ -o homepage
Simple installation
symfony new pwa-demo --webapp --php=8.2 && cd pwa-demo composer config extra.symfony.allow-contrib true composer config minimum-stability dev composer require spomky-labs/pwa-bundle:1.2.x bin/console importmap:require bootstrap echo "import 'bootstrap/dist/css/bootstrap.min.css'" >> assets/app.js bin/console importmap:require bootstrap-icons/font/bootstrap-icons.min.css echo "import 'bootstrap-icons/font/bootstrap-icons.min.css'" >> assets/app.js bin/console make:controller AppController sed -i "s|Route('/app'|Route('/'|" src/Controller/AppController.php sed -i "s|'app_app'|'app_homepage'|" src/Controller/AppController.php cat > templates/app/index.html.twig <<END {% extends 'base.html.twig' %} {% block body %} <div class="container"> <span class="bi bi-clock h1"></span> <div {{ stimulus_controller('epoch') }}></div> <div class="text text-muted"> created from {{ _self }} on {{ 'now'|date('U') }} </div> <a class="btn btn-primary"> <span class="bi bi-download"></span> Install as PWA</a>cd </div> {% endblock %} END cat > assets/controllers/epoch_controller.js <<END import { Controller } from '@hotwired/stimulus'; export default class extends Controller { connect() { this.element.textContent = "epoch time is now " + Date.now(); } } END symfony server:start -d symfony open:local
Existing PWAs to convert to Symfony
https://github.com/tacman/tutorial-pwa-capture-camera https://github.com/JoseJPR/tutorial-pwa-capture-audio#readme https://github.com/thecodearcher/PWA-currency-converter https://github.com/SalahHamza/currency-converter-pwa```
Worth Reading
https://www.educative.io/answers/how-to-do-offline-data-sync-in-pwa https://dexie.org/docs/Tutorial/