schultek / jaspr

Modern web framework for building websites in Dart. Supports SPAs and SSR.
https://jasprpad.schultek.de
MIT License
996 stars 59 forks source link

`jaspr generate` doesn't exist, but the docs still shows this #236

Closed exaby73 closed 1 month ago

exaby73 commented 1 month ago

Description

I am trying to generate a static site of a project I initially set up using SSR. The docs say I should use jaspr generate.

Steps To Reproduce

See https://docs.page/schultek/jaspr/core/ssg

Expected Behavior

Docs should be clear about how to generate a static site, even if the project was initially generated with the SSR preset

Additional Context

Output of jaspr generate:

Could not find a command named "generate".

Usage: jaspr <command> [arguments]

Global options:
-h, --help                 Print this usage information.
-v, --version              Print the current version info.
    --enable-analytics     Enable anonymous analytics.
    --disable-analytics    Disable anonymous analytics.

Available commands:

Project
  build    Builds the full project.
  create   Creates a new jaspr project.
  serve    Runs a development server that serves the jaspr app and reloads based on file system updates.

Tooling
  clean    Cleans the project directory.
  doctor   Shows information about the environment and project.
  update   Updates the jaspr cli.

Run "jaspr help <command>" for more information about a command.
schultek commented 1 month ago

Oops thats outdated docs.

Its now also 'jaspr build' for static sites.

exaby73 commented 1 month ago

Yeah I figured it out :). Could we also add a section explaining the modes, and its possible values? Also would be awesome to see docs on changes need to be done to turn a client only site to SSG or SSR. A migration guide of sorts I guess. I'm new to Jaspr, just decided to use it for a serious project so I don't think I'm the best one to make a PR for those docs, else I would. Thanks for your hard work on this. Hopefully we can get asset hashing into Jaspr soon too, for support on Globe :)

schultek commented 1 month ago

Fixed the docs.

Regarding asset hashing, I'm still waiting for general asset support on globe before I can test this out. Any progress there?

lesnitsky commented 1 month ago

@schultek asset support is on our roadmap, however, some changes will still be required from jaspr side as well. In general:

schultek commented 1 month ago

What I don't quite get is how would you support projects that are not using a framework like jaspr. I.e. just shelf with some static assets. Would user need to write a manifest and hash manually?