andrewjensen / hekla Goto Github PK
View Code? Open in Web Editor NEWA pluggable static code analysis toolset for understanding large Javascript projects
License: MIT License
A pluggable static code analysis toolset for understanding large Javascript projects
License: MIT License
TODO:
hekla-webpack-plugin
packageWe need integration tests for the webpack plugin package, to make sure there are not any breaking changes in core that would regress the plugin's behavior.
Make sure Travis runs these tests once they are ready.
Add documentation comments on public classes and functions, to make the codebase more accessible to contributors and plugin developers.
tapable
apply(analyzer) {
analyzer.hooks.newModule.tap('MyPlugin', () => {});
}
Analyzer
classUI frameworks contain entities that are important to identify and track for dependency analysis. Hekla should recognize these entities and provide hooks for plugins to act on them.
Examples:
We should be able to run Hekla from an app maintained with create-react-app
, where the build dependencies are hidden and inaccessible.
A possible way to handle this would be to run a build with stats (npm run build --stats
) and then have Hekla run on the generated stats file, since it contains everything we need for analysis. It would not be as fast as integrating with Webpack at compile time, but this doesn't seem to be an option.
Having the full moduleName of a Module is useful, but it can create a lot of visual noise when creating visualizations of the analysis.
Add a shortName
property to each Module, which is just the filename, unless it is named something like index.js
or app.js
, in which case it should add the parent directory to the shortName
.
A few people have mentioned being interested in using Hekla for non-web languages (specifically Java, Kotlin, and C#), and Hekla needs a more modular way of adding grammars anyway. We still need support for CSS-family languages and this may be a good opportunity to add plugin support for totally custom grammars.
The current code owners plugin supports a data structure that doesn't match a convention like CODEOWNERS. We should make a new plugin specifically for the format, and reuse some of the logic to generate a similar tree.
We don't always want to see the workers running, if analysis is running on CI, or in tests. We should be able to opt into the output.
Can we extract the logic into a built-in plugin? Then we could use it in the CLI as well.
TODO:
lerna
We should be able to set metadata on the analysis, that is not specific to any specific module.
The finished analysis might look like this:
{
"meta": {
"title": "My Application", // Defined in `hekla.config.js`
"unusedImports": [ // Created by an `UnusedImportsPlugin`
"my-unused-module",
"my-other-unused-module"
]
},
"modules": [
// ...
]
}
TODO:
CONTRIBUTING.md
fileThe project will be much easier to use and contribute to if it has type safety.
TODO:
hekla-core
hekla-cli
hekla-webpack-plugin
It's common in UI code, especially older frameworks like Backbone and AngularJS, to include snippets of HTML that are compiled into templates. These template fragments have important logic that should be available for analysis, just like HTML files are.
Developers should be able to swap out the default babel parser for another one, like typescript.
We need some basic test coverage on the hekla-cli
package so we know changes aren't causing regressions.
Things to test:
analysis.json
fileA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.