Polymer/polymer-analyzer

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

Homepage:

Size: 28868

Language: TypeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status NPM version

Polymer Analyzer

A static analysis framework for Web Components.

Install
install polymer-analyzer
Usage
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.`);


What's it used for?
Developing

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
Looking for Hydrolysis?

Hydrolysis has been renamed to Polymer Analyzer for version 2. You can find the hydrolysis source on the hydrolysis-1.x branch.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.