polymer-analyzer
Static analysis for Web Components
Last updated 4 months 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 (4 months ago)
  • 3.0.0-pre.25                                ...           next (2 years ago)

91 Versions

  • 3.2.4                                ...           4 months ago
  • 3.2.3                                ...           6 months ago
  • 3.2.2                                ...           10 months ago
  • 3.2.1                                ...           a year ago
  • 3.2.0                                ...           a year ago
  • 3.1.3                                ...           a year ago
  • 3.1.2                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.2                                ...           a year 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                                ...           2 years ago
  • 3.0.0-pre.9                                ...           2 years ago
  • 3.0.0-pre.8                                ...           2 years ago
  • 3.0.0-pre.7                                ...           2 years ago
  • 3.0.0-pre.6                                ...           2 years ago
  • 3.0.0-pre.5                                ...           2 years ago
  • 3.0.0-pre.4                                ...           2 years ago
  • 3.0.0-pre.3                                ...           2 years ago
  • 3.0.0-pre.2                                ...           2 years ago
  • 3.0.0-pre.1                                ...           2 years ago
  • 2.7.0                                ...           2 years ago
  • 2.6.0                                ...           2 years ago
  • 2.5.0                                ...           2 years ago
  • 2.4.1                                ...           2 years ago
  • 2.4.0                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.2.2                                ...           2 years ago
  • 2.2.1                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.0                                ...           2 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                                ...           3 years ago
  • 2.0.0-alpha.21                                ...           3 years ago
  • 2.0.0-alpha.20                                ...           3 years ago
  • 2.0.0-alpha.19                                ...           3 years ago
  • 2.0.0-alpha.18                                ...           3 years ago
  • 2.0.0-alpha.17                                ...           3 years ago
  • 2.0.0-alpha.16                                ...           3 years ago
  • 2.0.0-alpha.15                                ...           3 years ago
  • 2.0.0-alpha.14                                ...           3 years ago
  • 2.0.0-alpha.13                                ...           3 years ago
  • 2.0.0-alpha.12                                ...           3 years ago
  • 2.0.0-alpha.11                                ...           3 years ago
  • 2.0.0-alpha.10                                ...           3 years ago
  • 2.0.0-alpha.9                                ...           3 years ago
  • 2.0.0-alpha.8                                ...           3 years ago
  • 2.0.0-alpha.7                                ...           3 years ago
  • 2.0.0-alpha.6                                ...           3 years ago
  • 2.0.0-alpha.4                                ...           3 years ago
  • 2.0.0-alpha.3                                ...           3 years ago
  • 2.0.0-alpha.2                                ...           3 years ago
  • 2.0.0-alpha.1                                ...           3 years ago
Downloads
Today 3
This Week 10
This Month 405
Last Day 1
Last Week 112
Last Month 478
Dependencies (37)
Dev Dependencies (12)

Copyright 2014 - 2016 © taobao.org |