Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-angularjs-annotate

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-angularjs-annotate

Babel plugin to add angularjs dependency injection annotations

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
110K
increased by17.28%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-angularjs-annotate

Circle CI

Experimental fork of ng-annotate.

Work in progress. Do not use this for anything serious. Stick with ng-annotate or babel-ng-annotate for now.

Goals & Tasks

This project/experiment does not seek to replace ng-annotate. However, it does seek to provide similar functionality for Angular 1.x developers who are already using Babel and/or coding in ES6.

Because of some of the limitations presented by Babel's transformation process, this project does not aim to achieve feature parity, or provide identical output to ng-annotate. Notably, Babel does not preserve formatting and indentations like ng-annotate does.

Initially, I had hoped to make very few modifications to the upstream sources, in the hopes of eventually merging babel support directly into ng-annotate. Unfortunately, Babylon appears to have diverged too far from Acorn to make that goal realistic. (I would love to be wrong here, and would welcome contributions that close the gap between the two projects!)

That being said, this is my short-term todo list:

  • ✓ Support the majority of invocations/annotations currently performed by ng-annotate
  • ✓ Split up ng-annotate's test suite to be more granular and tolerant of some of babel's other transforms.
  • ✓ Actually pass those tests.
  • Pass tests in conjunction with the ES2015 preset.
  • Cleanup. Remove vestigial functionality from the upstream project.
  • Support a (very) limited set of ES6-friendly annotation patterns.
  • Publish to npm, make a release, etc.

Don't Say I Didn't Warn You

To test this mess of an experiment, create a .babelrc file for your sources

{
  "presets": ["es2015"],
  "plugins": ["path/to/babel-ng-annotate"]
}

And try it out:

babel myCode.js

To run tests:

npm test

License

MIT, see LICENSE file.

This project is a fork of ng-annotate, which was written by Olov Lassus with the kind help by contributors. Follow @olov on Twitter for updates about ng-annotate.

Keywords

FAQs

Package last updated on 15 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc