basehref 0.5.1

AngularDart base href rewriter (Builder)

This builder take your web/index.html ans add or edit the base href according to your configuration. The result is save in web/index.basehref.html

Using with AngularDart or in you dart web project :

Add this package to your pubspec.yaml file :

dev_dependencies:
  basehref: ^0.5.1

Then create or add to build.yaml :

targets:
  $default:
    builders:
      basehref|baseHrefBuilder:
        enabled: true
        options:
          href: '/my/application/base/href/'

and build your project with :

pub run build_runner build --delete-conflicting-outputs --release --output ./build

The result is stored in ./build/web/index.basehref.html (to my knowledge there is no way to replace the index.html with a Builder and/or PostProcessBuilder) : https://stackoverflow.com/questions/52397358/dart-build-config-rename-buildstep-inputid-file

0.5.1 #

  • Dependencies update

0.5.0 #

  • Add CHANGELOG.md
  • Add example
  • Correct lint warnings
  • Follow pub.dartlang.org analysis recommendations

example/README.md

basehref example #

pub get
pub run build_runner build --delete-conflicting-outputs --release --output ./build

Resulting html is in ./build/web/index.basehref.html

Use this package as a library

1. Depend on it

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


dependencies:
  basehref: ^0.5.1

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:basehref/basehref.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
18
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
59
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, other

Primary library: package:basehref/basehref.dart with components: io, build.

Health suggestions

Format lib/basehref.dart.

Run dartfmt to format lib/basehref.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
build ^1.1.4 1.1.6
build_config ^0.4.0 0.4.1+1
html ^0.14.0+2 0.14.0+2
logging ^0.11.3+2 0.11.3+2
pedantic ^1.7.0 1.8.0+1
Transitive dependencies
analyzer 0.38.0
args 1.5.2
async 2.3.0
charcode 1.1.2
checked_yaml 1.0.2
collection 1.14.12
convert 2.1.1
crypto 2.1.1+1
csslib 0.16.1
front_end 0.1.22
glob 1.1.7
json_annotation 3.0.0
kernel 0.3.22
meta 1.1.7
package_config 1.1.0
path 1.6.4
pub_semver 1.4.2
pubspec_parse 0.1.5
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+12
yaml 2.1.16
Dev dependencies
build_runner ^1.4.0
build_web_compilers ^2.0.0