built_html 0.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 77

A basic Builder for injecting content into html templates.

Usage #

First, add a dependency on this package:

  built_html: ^0.1.0

The next step is to rename your *.html files to a *.template.html files. Those files will be modified and copied to the original *.html location.

Also, take a look at example project for a working solution.

Commands #

digest <url> #

This command adds a content hash of an asset. Takes one parameter, the path to the file.

<script src="main.dart.js?q={{digest main.dart.js}}"></script>

version #

This command simply adds the version from your package.yaml. Takes no parameters.

<script src="main.dart.js?q={{version}}"></script>

0.1.3 #

Upgrade dependency for build to ^1.0.0.

0.1.2 #

Clean up .template.html files by default in release mode. To disable you can configure the builder in your build.yaml:

          enabled: false

0.1.1 #

Add support of version command.

0.1.0+1 #

Allow 2.0.0 of the sdk.

0.1.0 #

Initial release, supports {{digest


To test out the example, run following command:

$ pub run build_runner build --output out

The output will be located in the out/web/ directory.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  built_html: ^0.1.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:built_html/builder.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21


Detected platforms: Flutter, other

Platform components identified in package: build, io.

Maintenance suggestions

The package description is too short. (-2 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
build ^1.0.0 1.2.2
yaml ^2.1.15 2.2.0
Transitive dependencies
_fe_analyzer_shared 1.0.1
analyzer 0.39.2
args 1.5.2
async 2.4.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.16.1
glob 1.2.0
html 0.14.0+3
js 0.6.1+1
logging 0.11.3+2
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
path 1.6.4
pedantic 1.9.0
pub_semver 1.4.2
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+13
Dev dependencies
build_test ^0.10.0
test ^1.5.0