Name: polymer-analyzer
Owner: polymer
Description: A static analysis framework for web applications.
Created: 2015-01-29 18:56:38.0
Updated: 2018-01-03 09:14:45.0
Pushed: 2018-01-18 20:43:43.0
Size: 28868
Language: TypeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A static analysis framework for Web Components.
install polymer-analyzer
t {Analyzer} = require('polymer-analyzer');
t analyzer = Analyzer.createForDirectory('./');
his path is relative to the package root
yzer.analyze(['./my-element.html']).then((analysis) => {
Print the name of every property on paper-button, and where it was
inherited from.
nst [paperButton, ] = analysis.getFeatures(
{kind: 'element', id: 'paper-button', externalPackages: true});
(paperButton) {
for (const [name, property] of paperButton.properties) {
let message = `${name}`;
if (property.inheritedFrom) {
message += ` inherited from ${property.inheritedFrom}`;
} else {
message += ` was defined directly on paper-button`;
}
console.log(message);
}
else {
console.log(`my-element.html didn't define or import paper-button.`);
Polymer Analyzer is supported on Node LTS and stable. It is written in TypeScript. All development dependencies are installed via npm.
install
test
Or watch the source for changes, and run tests each time a file is modified:
run test:watch
Hydrolysis has been renamed to Polymer Analyzer for version 2. You can find the
hydrolysis source on the
hydrolysis-1.x
branch.