vue 0.4.1+1

  • Installing
  • Versions
  • 61

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.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.1+1

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:vue/vue.dart';
Version Uploaded Documentation Archive
0.4.1+1 Mar 6, 2019 Go to the documentation of vue 0.4.1+1 Download vue 0.4.1+1 archive
0.4.1 Nov 23, 2018 Go to the documentation of vue 0.4.1 Download vue 0.4.1 archive
0.4.0 Oct 10, 2018 Go to the documentation of vue 0.4.0 Download vue 0.4.0 archive
0.1.1 May 17, 2015 Go to the documentation of vue 0.1.1 Download vue 0.1.1 archive
0.1.0 May 13, 2015 Go to the documentation of vue 0.1.0 Download vue 0.1.0 archive
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 Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18


Detected platforms: web

Primary library: package:vue/vue.dart with components: html, js.

Health issues and suggestions

Document public APIs. (-1 points)

376 out of 376 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. (-12.66 points)

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

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.

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

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

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

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

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.

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

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

Analysis of lib/builders.dart reported 5 hints:

line 3 col 1: 'package:analyzer/analyzer.dart' is deprecated and shouldn't be used.

line 200 col 37: 'unit' is deprecated and shouldn't be used.

line 304 col 53: 'kind' is deprecated and shouldn't be used.

line 422 col 60: 'elements' is deprecated and shouldn't be used.

line 584 col 5: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Format lib/plugins/vuematerial_legacy.dart.

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

Maintenance issues and suggestions

Support latest dependencies. (-50 points)

The version constraint in pubspec.yaml does not support the latest published versions for 6 dependencies (4 direct: 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.33.0 <0.36.0 0.35.4 0.36.3
async ^2.0.7 2.2.0
build ^1.0.1 1.1.4
csslib ^0.14.4 0.14.6 0.16.0
html ^0.13.3 0.13.4+2 0.14.0+2
js ^0.6.1 0.6.1+1
sass ^1.8.0 1.21.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.5.5
uuid ^1.0.0 1.0.3 2.0.2
Transitive dependencies
args 1.5.2
build_config 0.4.0
charcode 1.1.2
cli_repl 0.2.0+1
collection 1.14.11
convert 2.1.1
crypto 2.0.6
front_end 0.1.14 0.1.18
glob 1.1.7
http 0.12.0+2
http_parser 3.1.3
json_annotation 2.4.0
kernel 0.3.14 0.3.18
logging 0.11.3+2
matcher 0.12.5
meta 1.1.7
package_config 1.0.5
package_resolver 1.0.10
path 1.6.2
pedantic 1.7.0
pub_semver 1.4.2
pubspec_parse 0.1.4
quiver 2.0.3
stack_trace 1.9.3
stream_transform 0.0.19
string_scanner 1.0.4
term_glyph 1.1.0
tuple 1.0.2
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.16