Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add polymerBehavior annotations for hydrolysis #72

Open
naoak opened this issue Apr 1, 2016 · 0 comments
Open

Add polymerBehavior annotations for hydrolysis #72

naoak opened this issue Apr 1, 2016 · 0 comments

Comments

@naoak
Copy link

naoak commented Apr 1, 2016

Hi, I'm using web-components-shards to separate vulcanized bundles. When I built leaflet-map with it, the following warnings were emitted.

Behavior leafletMap.LeafletPopupContent not found when mixing properties into leaflet-circle!
Behavior leafletMap.LeafletPopupContent not found when mixing properties into leaflet-polyline!
Behavior leafletMap.LeafletPopupContent not found when mixing properties into leaflet-polygon!
Behavior leafletMap.LeafletTileLayer not found when mixing properties into leaflet-tilelayer!
Behavior leafletMap.LeafletTileLayer not found when mixing properties into leaflet-tilelayer-wms!
Behavior leafletMap.LeafletILayer not found when mixing properties into leaflet-geojson!
Behavior leafletMap.LeafletPopupContent not found when mixing properties into leaflet-marker!

This is because hydrolysis often fails to detect definitions of behaviors without @polymerBehavior annotations. If it fails, it emits them.

You can reproduce this in the following way.

$ npm install hydrolysis
$ mkdir -p ../leaflet/dist
$ touch ../leaflet/dist/leaflet.css
$ touch ../leaflet/dist/leaflet.js
// Save as `test.js`
var h = require('hydrolysis');
var imports = [
  'leaflet-control.html',
  'leaflet-core.html',
  'leaflet-draw.html',
  'leaflet-geojson.html',
  'leaflet-geolocation.html',
  'leaflet-import.html',
  'leaflet-layer-group.html',
  'leaflet-layer.html',
  'leaflet-map.html',
  'leaflet-marker.html',
  'leaflet-popup.html'
];

imports.forEach(function(html) {
  h.Analyzer.analyze(html);
});
$ node test.js

If you'd like it, I'll make a PR.
Thanks.

naoak added a commit to s-cradle/leaflet-map that referenced this issue Apr 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant