Skip to content

Commit 2c983a6

Browse files
committed
Upgrade Babel 7
1 parent ca3a046 commit 2c983a6

12 files changed

+1111
-718
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"presets": [
33
[
4-
"env",
4+
"@babel/preset-env",
55
{
66
"targets": {
77
"browsers": ["last 2 versions"]

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This plugin currently supports matching and transforming all of the patterns cur
1212

1313
## Installation
1414

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

1717
Most users will want to run
1818

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

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

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

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

61-
**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.
61+
**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.
6262

6363
_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._
6464

ng-annotate-main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const assert = require("assert");
88
const ngInject = require("./nginject");
99
const scopeTools = require("./scopetools");
1010
// const optionalAngularDashboardFramework = require("./optionals/angular-dashboard-framework");
11-
const t = require('babel-types');
11+
const t = require('@babel/types');
1212

1313

1414
const chainedRouteProvider = 1;

nginject.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"use strict";
66

77
const is = require("simple-is");
8-
const t = require('babel-types');
9-
const codeFrame = require("babel-code-frame");
8+
const t = require('@babel/types');
9+
const codeFrame = require("@babel/code-frame");
1010

1111
module.exports = {
1212
inspectComment: inspectComment,

0 commit comments

Comments
 (0)