Thursday, June 26, 2014

Metawidget meets Bower

I was recently asked whether I could add Bower support to Metawidget.

I'm delighted to say this has now been set up. The repository is here and you can install it just like any Bower repo...

bower install metawidget

...or add it into your project's bower.json file...

{
   "name": "my-app",
   "dependencies": {
      ...
      "metawidget": "~3.9.0"
   },
   "private": true
}

Other Metawidget modules, such as metawidget-angular.min.js and metawidget-bootstrap.min.js, are also included in this repository.

Feedback welcome!

7 comments:

Anonymous said...

What about angular metawidget?

Richard said...

Yeah, they're all there.

I try to keep all Metawidget modules at the same version number, so that I can thoroughly integration test them working together. Therefore it seemed to make sense to have one Bower repo for the whole '3.9.0' release (or whatever version) rather than separate Bower repos for Angular, Bootstrap etc.

Does that work for your needs?

Samcfc said...

I am the one who asked bower support.

Guy, you have done it very quickly and I saw you questions too late , thanks again :)

Pla4inta said...

Hi, Richard!

Any chance to support JSON-schema v4? (in near future) :)

Thanks,
Andrei

TucanBogotano said...

Hello, Richard.

We in the organisation I work for are very enthusiastic about using Metawidget to generate Vaadin GUI elements from JSON Schemas. We were parsing through the Metawidget documentation and wandering about the JSON Schema spec Metawidget uses. Can we access that spec in any way? Thanks in advance.

Richard said...

Yes, Metawidget uses JSON Schema version 3: http://json-schema.org

Richard said...

The main difference between v3 and v4 of JSON Schema (as far as Metawidget is concerned) is that they've moved the 'required' attribute out of the property it refers to...

foo {
type: 'string'
required: true
}

...and into the parent entity...

foo: {
type: 'string'
}
required: [ 'foo' ]

This isn't a change that works well for Metawidget, so I have no immediate plans to support it.

However your contribution would be welcome!