luce 0.0.13

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

Tiny web framework inspired by hyperapp and Flutter.

Work in progress.

0.0.13

  • Simplified approach to attributes and class names.

0.0.12

  • Separate state-handling utilities in their own library that does not depend on dart:html.
  • Fixed bugs with invalidated vnodes being used during update operations.

0.0.11

  • Break up code in core and std libraries.

0.0.10

  • Begun mouse and keyboard event support.
  • On-the-fly wrapping of Text nodes in Span elements as needed.

0.0.9

  • Introduce more linter rules.

0.0.8

  • Extensive code reorganization.
  • Remove fake DOM.
  • Experiments with Widgets for dynamic attributes.

0.0.7

  • Bumped Dart SDK version to 2.1.0.
  • Formatting cleanup.

0.0.6

  • Hide private class Xn.

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/std.dart';

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

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

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

class Counter with ChangeNotification {
  int _value = 0;

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

  int get value => _value;
}

class CounterComponent extends Component {
  CounterComponent(this.counter);

  final Counter counter;

  @override
  Widget build(BuildContext context) {
    context.rebuildOn(counter.changes);
    return MouseEvents(
      onClick: (e) => counter.up(),
      child: Div(children: [
        const Txt('Your Luce app is running.'),
        const Br(),
        Div(
          classes: (counter.value > 7) ? const ['high'] : const [],
          children: [Txt('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.13

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/state.dart';
import 'package:luce/std.dart';
import 'package:luce/vdom.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]
34
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
58
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: web

Platform components identified in package: html.

Health issues and suggestions

Document public APIs (-10 points)

154 out of 154 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v0.1 release. (-10 points)

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
meta ^1.1.6 1.1.6
Dev dependencies
luce_test
test any