v0.11.0
The cli scaffolding update
This update ships a completely new way of creating jaspr projects using the jaspr create
command. Instead of using fixed templates, you will now be asked a series of questions to fully customize your starting project to your needs.
Changelog (jaspr, jaspr_cli)
-
BREAKING Changed jaspr configuration to require
jaspr.mode
inpubspec.yaml
:The
jaspr.mode
option now sets the rendering mode and must be one of:- static: For building a statically pre-rendered site (SSG) with optional client-side hydration.
- server: For building a server-rendered site (SSR) with optional client-side hydration.
- client: For building a purely client-rendered site (SPA).
This replaces the old
jaspr.uses-ssr
option. -
BREAKING Removed
jaspr generate
command in favor using thejaspr build
command in combination with
the newjaspr.mode = static
option inpubspec.yaml
. -
BREAKING Removed the
runServer()
method along with its support for adding middleware and listeners. Users should instead
migrate to the custom backend setup usingpackage:shelf
. -
BREAKING Removed
rawHtml
flag fromText
component andtext()
method, in favor of
newRawText
component andraw()
method respectively, which fixes multiple bugs with the old implementation. -
Improved the
jaspr create
command by changing to a scaffolding system as replacement for templates.
You will now be walked through a configuration wizard that creates a starting project based on the selected options. -
Removed
jaspr.uses-flutter
option. This is now auto-detected based on the dependencies. -
Styles can now be written more concise using the ability to chain style groups as well as the new
css()
method. -
Changes made to
main.dart
are now also hot-reloaded on the server. -
Document
is no longer required when using server-side rendering. A basic document structure (<html><head>...<body>...
)
is automatically filled in. -
Improved how
@client
components are hydrated. -
The
jaspr build
command now accepts an optimization option. Minification (-O 2
) enabled by default. -
Fixed
DomValidator
to allow special attributes with uppercase letters and colons. -
Exceptions thrown during
renderHtml
are now correctly passed through to the spawning isolate.
Changelog (jaspr_router)
-
Added
Link
component to simplify router-aware navigation.The
Link
component lets the user navigate to another route by clicking or tapping on it. It uses client-side routing
if possible and fall back to the default browser navigation if noRouter
component is present in the tree. It will render
an accessible<a>
element with a validhref
, which means that things like right-clicking aLink
work as you'd expect. -
Fixed redirects on initial load.
-
Fixed proper handling of
<base>
path.