jaspr_builder 0.21.1 copy "jaspr_builder: ^0.21.1" to clipboard
jaspr_builder: ^0.21.1 copied to clipboard

Builders for jaspr

Builders for jaspr

Setup #

First, add jaspr_builder as a dev dependency to your project:

dart pub add jaspr_builder --dev

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';

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.

1
likes
0
points
5.92k
downloads

Publisher

verified publisherschultek.dev

Weekly Downloads

Builders for jaspr

Homepage
Repository (GitHub)
View/report issues

Topics

#jaspr #web #codegen #build-runner

Documentation

Documentation

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

analyzer, build, collection, dart_style, glob, jaspr, path, source_gen, yaml

More

Packages that depend on jaspr_builder