luce 0.0.5

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 51

Tiny web framework inspired by hyperapp and Flutter.

Work in progress.

0.0.5 #

  • Support fake DOM for testing.
  • Various refactoring and renaming.

0.0.4 #

  • Localized tree rebuild with less rework.
  • Support arbitrary changes to Element child lists.

0.0.3 #

  • Support localized tree rebuild.

0.0.2 #

  • Reimplementation begun. Supporting only the simplest DOM scenarios.

0.0.1 #

  • Initial import, a modified Dart port of hyperapp.

example/luce_example.dart

import 'package:luce/luce_html.dart';
import 'dart:html';

void main() {
  final Counter counter = Counter();
  final Widget widget = CounterComponent(counter);

  mount(widget, querySelector('#output'));

  window.onKeyPress.listen((KeyboardEvent event) {
    counter.up();
  });
}

class Counter with ChangeNotification {
  int _value = 0;

  void up() {
    _value += 1;
    notify();
  }

  int get value => _value;
}

class CounterComponent extends Component {
  final Counter counter;

  CounterComponent(this.counter);

  Widget build(BuildContext context) {
    context.rebuildOn(counter.changes);
    return Div(children: [
      const Text('Your Luce app is running.'),
      const Br(),
      Text('Counter value is ${counter.value}'),
    ]);
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  luce: ^0.0.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:luce/luce_core.dart';
import 'package:luce/luce_fake.dart';
import 'package:luce/luce_html.dart';
  
Version Uploaded Documentation Archive
0.0.13 Dec 4, 2018 Go to the documentation of luce 0.0.13 Download luce 0.0.13 archive
0.0.12 Dec 2, 2018 Go to the documentation of luce 0.0.12 Download luce 0.0.12 archive
0.0.11 Nov 28, 2018 Go to the documentation of luce 0.0.11 Download luce 0.0.11 archive
0.0.10 Nov 27, 2018 Go to the documentation of luce 0.0.10 Download luce 0.0.10 archive
0.0.9 Nov 27, 2018 Go to the documentation of luce 0.0.9 Download luce 0.0.9 archive
0.0.8 Nov 26, 2018 Go to the documentation of luce 0.0.8 Download luce 0.0.8 archive
0.0.7 Nov 24, 2018 Go to the documentation of luce 0.0.7 Download luce 0.0.7 archive
0.0.6 Nov 24, 2018 Go to the documentation of luce 0.0.6 Download luce 0.0.6 archive
0.0.5 Nov 24, 2018 Go to the documentation of luce 0.0.5 Download luce 0.0.5 archive
0.0.4 Nov 23, 2018 Go to the documentation of luce 0.0.4 Download luce 0.0.4 archive

All 13 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
15
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
51
Learn more about scoring.

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

  • Dart: 2.3.0
  • pana: 0.12.15

Platforms

Detected platforms: web

Platform components identified in package: html.

Health issues and suggestions

Document public APIs. (-1 points)

125 out of 125 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/core/widgets.dart. (-0.50 points)

Analysis of lib/src/core/widgets.dart reported 1 hint:

line 32 col 5: Don't explicitly initialize variables to null.

Format lib/src/dom/fake.dart.

Run dartfmt to format lib/src/dom/fake.dart.

Format lib/src/dom/html.dart.

Run dartfmt to format lib/src/dom/html.dart.

Maintenance suggestions

The package description is too short. (-20 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 is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
luce_test