Skip to content

Upgrade Babel 7 #43

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
[
"env",
"@babel/preset-env",
{
"targets": {
"browsers": ["last 2 versions"]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This plugin currently supports matching and transforming all of the patterns cur

## Installation

Use like any other [Babel plugin](https://babeljs.io/docs/plugins/).
Use like any other [Babel plugin](https://babeljs.io/docs/plugins/).

Most users will want to run

Expand All @@ -24,7 +24,7 @@ and add the plugin to your `.babelrc` file:

```json
{
"presets": ["es2015"],
"presets": ["@babel/preset-env"],
"plugins": ["angularjs-annotate"]
}
```
Expand All @@ -39,7 +39,7 @@ To pass this option to the plugin, [add it to your Babel configuration](https://

```json
{
"presets": ["es2015"],
"presets": ["@babel/preset-env"],
"plugins": [["angularjs-annotate", { "explicitOnly" : true}]]
}
```
Expand All @@ -58,7 +58,7 @@ This plugin can annotate some ES6 classes and arrow functions that are not suppo

Arrow functions may be annotated anywhere that a "regular" function expression may be used.

**NOTE:** There are places where you _shouldn't_ use arrow functions in an Angular application. Inside of an arrow function, the value of `this` is inherited from the lexical scope enclosing the function. For this reason, arrow functions should not be used to declare Angular services or providers.
**NOTE:** There are places where you _shouldn't_ use arrow functions in an Angular application. Inside of an arrow function, the value of `this` is inherited from the lexical scope enclosing the function. For this reason, arrow functions should not be used to declare Angular services or providers.

_If you choose to ignore this warning, we'll add the annotations to your services and providers anyway, but your application probably won't work. Future releases may treat this condition as an error._

Expand Down
2 changes: 1 addition & 1 deletion ng-annotate-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const assert = require("assert");
const ngInject = require("./nginject");
const scopeTools = require("./scopetools");
// const optionalAngularDashboardFramework = require("./optionals/angular-dashboard-framework");
const t = require('babel-types');
const t = require('@babel/types');


const chainedRouteProvider = 1;
Expand Down
4 changes: 2 additions & 2 deletions nginject.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"use strict";

const is = require("simple-is");
const t = require('babel-types');
const codeFrame = require("babel-code-frame");
const t = require('@babel/types');
const codeFrame = require("@babel/code-frame");

module.exports = {
inspectComment: inspectComment,
Expand Down
Loading