vue 0.4.2

  • Readme
  • Changelog
  • Installing
  • 60

VueDart #

VueDart lets you create Vue web apps using Dart.

Website and documentation #

Status #

What works:

  • App and component definitions.
  • Templates.
  • Data.
  • Properties.
  • Computed data.
  • Methods.
  • Refs.
  • Lifecycle callbacks.
  • Mixins.
  • vue-router.
  • Scoped styles.

What doesn't work:

  • Render functions (or at least, they don't work well).
  • Some of the instance properties.
  • Server-side rendering.
  • Hardcoded support for the Vuex plugin.
  • Generic plugin support (this is going to take a while though).

Based on the official Vue logo. I basically just changed the color.

0.4.2 #

  • Fixes for latest analyzer and Dart SDKs.

0.4.1 #

  • Upgrade packages to work under Dart 2.1.

0.4.0 #

  • Dart 2.0 is now supported!
  • BREAKING CHANGE vue2 and vue2_cli have been renamed to vue and vue_cli, respectively.
  • BREAKING CHANGE package:build is now used instead of Pub transformers. Using Pub is no longer supported.
  • BREAKING CHANGE Components are never globally registered. Instead, they must explicitly be passed to the VueComponent annotation.
  • BREAKING CHANGE A new, extensible VueAppOptions API has been added for passing miscellaneous options to app constructors, and the specialized router argument has been dropped in favor of options.
  • BREAKING CHANGE Mixins no longer have to be explicitly passed to the mixins: argument. Instead, VueDart will automatically find mixins in your class's with clause.
  • BREAKING CHANGE Mixins must now all have an implements VueMixinRequirements clause. This also means that they have access to pretty much the entire component/app API out-of-the-box.
  • BREAKING CHANGE The overridable lifecycle methods now all have a lifecycle prefix, e.g. void mounted became void lifecycleMounted.
  • BREAKING CHANGE The constructor boilerplate has all been dropped! No more Component(context) => super(context) or factory App(context) => ....
  • BREAKING CHANGE As a side-effect of the above, it is now prohibited to access anything Vue-related in your constructors. To be precise, constructors can no longer be used as a substitute for the created lifecycle hook. Instead, override the new void lifecycleCreated() method.
  • BREAKING CHANGE The event API has been overhauled. Instead of the vanilla Vue-style $on and $emit API, it's now built around Dart-native streams and sinks. The result is far more type-safe than before. The old functions have been removed.
  • BREAKING CHANGE bool props now create a boolean prop, instead of a prop that's either null or an empty string. (This is mostly a bugfix.)
  • BREAKING CHANGE The vue_router plugin now requires you pass components like Component() instead of #Component.
  • You can now use Sass in your styles!! Just set lang="sass" or lang="scss" on your <style scoped> tags.
  • Mixins are now supported on a VueApp.
  • Models are supported via @model([event: '...']).
  • Fix methods that take optional arguments under Dart 2.0.

0.3.2 #

  • Fix #13: internal symbols were duplicated when using part with component files.
  • Merged #12: fixed typos in documentation.
  • Merged #16: check window.Vue to make sure it's been defined.

0.3.1 #

  • Upgrade scopify to 0.2.0.
  • BREAKING CHANGE Due to the above upgrade, scoped styles no longer "bleed" into child elements. This behavior can still be manually re-enabled via the bleeds option to the style element. (AFAIK no one actually really used this, so it's not really a big change.)

0.3.0 #

  • BREAKING CHANGE Require explicit declaration of entry points.
  • BREAKING CHANGE The VueComponent annotation now requires the name to be in a named argument (e.g. @VueComponent(name: 'foo'), instead of @VueComponent('foo')). This was necessary to support unnamed components.
  • Added the VueDart CLI.
  • Proper error messages.
  • Add VueMaterial 0.7 support.
  • Add vue-router support.
  • Avoid needlessly rewriting HTML source files by switching from html package's DOM manipulation to using Dart's refactoring libraries.
  • Change all vue.js script tags to vue.min.js when in release mode, not just unpkg ones.
  • Implement support for mixins (for components only for now).
  • Implement scoped styles.
  • Implement watchers.
  • Add support for more instance methods: $data, $props, $el, $options, $parent, $root, $on, $once, $off, $emit, $nextTick, $forceUpdate, and $destroy.
  • Add VueConfig and VueConfig.ignoredElements.

0.2.0 #

  • Remove need for explicit initialize transformer usage.
  • Upgrade initialize dependency for strong mode/DDC support.

0.1.0 #

  • Initial.

Use this package as a library

1. Depend on it

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

  vue: ^0.4.2

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:vue/vue.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 Jan 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health issues and suggestions

Document public APIs. (-1 points)

378 out of 378 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/vue.dart. (-20.99 points)

Analysis of lib/vue.dart reported 47 hints, including:

line 35 col 11: Unnecessary new keyword.

line 54 col 11: Unnecessary new keyword.

line 133 col 28: Don't explicitly initialize variables to null.

line 133 col 37: Use = to separate a named parameter from its default value.

line 133 col 45: Don't explicitly initialize variables to null.

Fix lib/builders.dart. (-13.53 points)

Analysis of lib/builders.dart reported 29 hints, including:

line 115 col 5: Unnecessary new keyword.

line 117 col 10: Prefer to use whereType on iterable.

line 235 col 20: Unnecessary new keyword.

line 259 col 26: Unnecessary new keyword.

line 262 col 25: Unnecessary new keyword.

Fix lib/plugins/vue_router.dart. (-10.89 points)

Analysis of lib/plugins/vue_router.dart reported 23 hints, including:

line 33 col 12: Unnecessary new keyword.

line 73 col 24: Don't explicitly initialize variables to null.

line 73 col 33: Use = to separate a named parameter from its default value.

line 73 col 41: Don't explicitly initialize variables to null.

line 73 col 55: Use = to separate a named parameter from its default value.

Format lib/plugins/vuematerial_legacy.dart.

Run dartfmt to format lib/plugins/vuematerial_legacy.dart.

Maintenance issues and suggestions

Support latest dependencies. (-40 points)

The version constraint in pubspec.yaml does not support the latest published versions for 4 dependencies (analyzer, csslib, html, uuid).

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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and vue.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
analyzer >=0.37.0 <0.39.0 0.38.5 0.39.4
async ^2.0.7 2.4.0
build ^1.1.6 1.2.2
csslib ^0.14.4 0.14.6+1 0.16.1
html ^0.13.3 0.13.4+2 0.14.0+3
js ^0.6.1 0.6.1+1
sass ^1.8.0 1.25.0
sass_builder ^2.1.0 2.1.3
scopify ^0.2.1 0.2.2
source_maps ^0.10.6 0.10.8
source_span ^1.4.0 1.6.0
uuid ^1.0.0 1.0.3 2.0.4
Transitive dependencies
args 1.5.2
build_config 0.4.1+1
charcode 1.1.2
checked_yaml 1.0.2
cli_repl 0.2.0+1
collection 1.14.12
convert 2.1.1
crypto 2.1.4
front_end 0.1.27 0.1.29
glob 1.2.0
http 0.12.0+4
http_parser 3.1.3
json_annotation 3.0.1
kernel 0.3.27 0.3.29
logging 0.11.4
matcher 0.12.6
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
package_resolver 1.0.10
path 1.6.4
pedantic 1.9.0
pub_semver 1.4.2
pubspec_parse 0.1.5
quiver 2.1.2+1
stack_trace 1.9.3
stream_transform 1.1.0
string_scanner 1.0.5
term_glyph 1.1.0
tuple 1.0.3
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+13
yaml 2.2.0