polymer-analyzer
Static analysis for Web Components
Last updated a year ago by usergenic .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install polymer-analyzer 
SYNC missed versions from official npm registry.

Build Status NPM version

Polymer Analyzer

A static analysis framework for Web Components.

Install

npm install polymer-analyzer

Usage

const {Analyzer, FsUrlLoader, PackageUrlResolver} = require('polymer-analyzer');

const rootDir = process.cwd();
const analyzer = new Analyzer({
  urlLoader: new FsUrlLoader(rootDir),
  urlResolver: new PackageUrlResolver({ packageDir: rootDir }),
});

// This path is relative to the root dir
analyzer.analyze(['my-element.html']).then((analysis) => {
  // Print the name of every property on paper-button, and where it was
  // inherited from.
  const [paperButton] = analysis.getFeatures(
      {kind: 'element', id: 'paper-button', externalPackages: true});
  if (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.

npm install
npm test

Or watch the source for changes, and run tests each time a file is modified:

npm 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.

Current Tags

  • 3.2.4                                ...           latest (a year ago)
  • 3.0.0-pre.25                                ...           next (2 years ago)

91 Versions

  • 3.2.4                                ...           a year ago
  • 3.2.3                                ...           a year ago
  • 3.2.2                                ...           2 years ago
  • 3.2.1                                ...           2 years ago
  • 3.2.0                                ...           2 years ago
  • 3.1.3                                ...           2 years ago
  • 3.1.2                                ...           2 years ago
  • 3.1.1                                ...           2 years ago
  • 3.1.0                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 3.0.0-pre.25                                ...           2 years ago
  • 3.0.0-pre.24                                ...           2 years ago
  • 3.0.0-pre.23                                ...           2 years ago
  • 3.0.0-pre.22                                ...           2 years ago
  • 3.0.0-pre.21                                ...           2 years ago
  • 3.0.0-pre.20                                ...           2 years ago
  • 3.0.0-pre.19                                ...           2 years ago
  • 3.0.0-pre.18                                ...           2 years ago
  • 3.0.0-pre.17                                ...           2 years ago
  • 3.0.0-pre.16                                ...           2 years ago
  • 3.0.0-pre.15                                ...           2 years ago
  • 3.0.0-pre.14                                ...           2 years ago
  • 3.0.0-pre.13                                ...           2 years ago
  • 3.0.0-pre.12                                ...           2 years ago
  • 3.0.0-pre.11                                ...           2 years ago
  • 3.0.0-pre.10                                ...           3 years ago
  • 3.0.0-pre.9                                ...           3 years ago
  • 3.0.0-pre.8                                ...           3 years ago
  • 3.0.0-pre.7                                ...           3 years ago
  • 3.0.0-pre.6                                ...           3 years ago
  • 3.0.0-pre.5                                ...           3 years ago
  • 3.0.0-pre.4                                ...           3 years ago
  • 3.0.0-pre.3                                ...           3 years ago
  • 3.0.0-pre.2                                ...           3 years ago
  • 3.0.0-pre.1                                ...           3 years ago
  • 2.7.0                                ...           3 years ago
  • 2.6.0                                ...           3 years ago
  • 2.5.0                                ...           3 years ago
  • 2.4.1                                ...           3 years ago
  • 2.4.0                                ...           3 years ago
  • 2.3.0                                ...           3 years ago
  • 2.2.2                                ...           3 years ago
  • 2.2.1                                ...           3 years ago
  • 2.2.0                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.2                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 2.0.0-alpha.42                                ...           3 years ago
  • 2.0.0-alpha.41                                ...           3 years ago
  • 2.0.0-alpha.40                                ...           3 years ago
  • 2.0.0-alpha.39                                ...           3 years ago
  • 2.0.0-alpha.38                                ...           3 years ago
  • 2.0.0-alpha.37                                ...           3 years ago
  • 2.0.0-alpha.36                                ...           3 years ago
  • 2.0.0-alpha.35                                ...           3 years ago
  • 2.0.0-alpha.34                                ...           3 years ago
  • 2.0.0-alpha.33                                ...           3 years ago
  • 2.0.0-alpha.32                                ...           3 years ago
  • 2.0.0-alpha.31                                ...           3 years ago
  • 2.0.0-alpha.30                                ...           3 years ago
  • 2.0.0-alpha.29                                ...           3 years ago
  • 2.0.0-alpha.28                                ...           3 years ago
  • 2.0.0-alpha.27                                ...           3 years ago
  • 2.0.0-alpha.26                                ...           3 years ago
  • 2.0.0-alpha.25                                ...           3 years ago
  • 2.0.0-alpha.24                                ...           3 years ago
  • 2.0.0-alpha.23                                ...           3 years ago
  • 2.0.0-alpha.22                                ...           4 years ago
  • 2.0.0-alpha.21                                ...           4 years ago
  • 2.0.0-alpha.20                                ...           4 years ago
  • 2.0.0-alpha.19                                ...           4 years ago
  • 2.0.0-alpha.18                                ...           4 years ago
  • 2.0.0-alpha.17                                ...           4 years ago
  • 2.0.0-alpha.16                                ...           4 years ago
  • 2.0.0-alpha.15                                ...           4 years ago
  • 2.0.0-alpha.14                                ...           4 years ago
  • 2.0.0-alpha.13                                ...           4 years ago
  • 2.0.0-alpha.12                                ...           4 years ago
  • 2.0.0-alpha.11                                ...           4 years ago
  • 2.0.0-alpha.10                                ...           4 years ago
  • 2.0.0-alpha.9                                ...           4 years ago
  • 2.0.0-alpha.8                                ...           4 years ago
  • 2.0.0-alpha.7                                ...           4 years ago
  • 2.0.0-alpha.6                                ...           4 years ago
  • 2.0.0-alpha.4                                ...           4 years ago
  • 2.0.0-alpha.3                                ...           4 years ago
  • 2.0.0-alpha.2                                ...           4 years ago
  • 2.0.0-alpha.1                                ...           4 years ago
Downloads
Today 93
This Week 197
This Month 199
Last Day 8
Last Week 116
Last Month 600
Dependencies (37)
Dev Dependencies (12)

Copyright 2014 - 2017 © taobao.org |