SwifWeb Documentation

repository·master·Indexed 41 days ago

https://github.com/swifweb/web

A framework for building reactive web applications using Swift by wrapping DOM, CSS, and Web APIs into a Swift-native interface. Includes guides on project scaffolding, debugging, and releasing Single Page Applications (SPA) and Progressive Web Apps (PWA) using the webber tool.

Tokens
387
Snippets
3
Records
5
Agent score
2%

What's inside SwifWeb

  1. Customize entrypoint files

    master
    SwifWeb generates entry files in a hidden .webber directory. If you need to add custom logic that cannot be handled in Swift (such as a custom loading bar), you can edit the files located in .webber/entrypoint/dev.
  2. Release a SwifWeb project

    master

    To prepare your project for production, use the webber release command. After the command completes, your production-ready files will be located in the .webber/release folder.

    For PWA projects, include the -t pwa -s Service flags to ensure the correct build configuration.

    # For standard SPA
    webber release
    
    # For PWA
    webber release -t pwa -s Service
  3. Run and debug a SwifWeb project

    master

    Once your project is created, navigate to the project folder. You can use the webber serve command to debug your application in a browser.

    For Progressive Web Apps (PWA), use the -t pwa flag and specify the service with -s Service to ensure the PWA features are correctly initialized during development.

    # For standard SPA
    webber serve
    
    # For PWA
    webber serve -t pwa -s Service