Last updated:
0 purchases
jaspr builder
Builders for jaspr
Setup #
First, add jaspr_builder as a dev dependency to your project:
dart pub add jaspr_builder --dev
copied to clipboard
Builders #
@client #
Builder for automatic setup of client components.
View client components for documentation.
@Import #
Builder for mocking platform-specific libraries. Used for integrating js-libraries with jaspr.
How to use #
Instead of importing those libraries directly, use the @Import.onWeb or @Import.onServer annotation.
@Import.onWeb('dart:html', show: [#window, #HtmlDocument])
@Import.onServer('dart:io', show: [#Platform])
import 'app.imports.dart';
copied to clipboard
The actual import directive must be the filename plus .imports.dart.
Finally, run code generation using dart run build_runner build.
You don't need the code-generation step if you are running jaspr serve, since it will automatically
build and watch your files for changes.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.