Skip to content

Commit

Permalink
Upgrade Babel 7
Browse files Browse the repository at this point in the history
  • Loading branch information
pioug committed May 21, 2018
1 parent ca3a046 commit 2c983a6
Show file tree
Hide file tree
Showing 12 changed files with 1,111 additions and 718 deletions.
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

0 comments on commit 2c983a6

Please sign in to comment.