A static analysis framework for Web Components.
npm install polymer-analyzer
const Analyzer = require('polymer-analyzer/analyzer').Analyzer;
const FSUrlLoader = require('polymer-analyzer/url-loader/fs-url-loader').FSUrlLoader;
let analyzer = new Analyzer({
urlLoader: new FSUrlLoader(pathToPackageRoot),
urlResolver: new PackageUrlResolver(),
});
analyzer.analyze('/path-to-polymer-element.html')
.then((document) => {
console.log(document.getFeatures());
});
Polymer Analyzer is supported on Node LTS (4.4) and stable (6.3). It is written in TypeScript 2.0. 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
Hydrolysis has been renamed to Polymer Analyzer for version 2. You can find the
hydrolysis source on the
hydrolysis-1.x
branch.