Comparing version 1.2.0 to 1.2.1
@@ -56,3 +56,4 @@ 'use strict'; | ||
}); | ||
var ctx = new esrefactor.Context(inCode); | ||
var ctx = new esrefactor.Context(ast); | ||
ctx._code = inCode; | ||
@@ -59,0 +60,0 @@ estraverse.traverse(ast,{ |
{ | ||
"name": "derequire", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "remove requires", | ||
@@ -24,5 +24,5 @@ "main": "index.js", | ||
"concat-stream": "^1.4.6", | ||
"esprima-fb": "^3001.1.0-dev-harmony-fb", | ||
"esprima-fb": "^10001.1.0-dev-harmony-fb", | ||
"esrefactor": "~0.1.0", | ||
"estraverse": "~1.5.0", | ||
"estraverse": "~1.9.1", | ||
"yargs": "^1.3.1" | ||
@@ -29,0 +29,0 @@ }, |
@@ -13,5 +13,5 @@ derequire [![Build Status](https://travis-ci.org/calvinmetcalf/derequire.svg)](https://travis-ci.org/calvinmetcalf/derequire) | ||
takes a string of code and replaces all instances of the identifier `tokenFrom` (default 'require') and replaces them with tokenTo (default '\_dereq\_') but only if they are functional arguments or variable declerations and subsequent uses of said argument, then returnes the code. | ||
`derequire` takes a string of code and replaces all instances of the `tokenFrom` identifier (defaults to 'require') and replaces them with the `tokenTo` identifier (defaults to '\_dereq\_') but only if they are functional arguments or variable declarations and subsequent uses of said argument, then returnes the code. | ||
For multiple renames at the same times accepts the syntax | ||
For multiple renames at the same time, the following syntax is accepted: | ||
@@ -31,2 +31,2 @@ ```js | ||
__Note:__ in order to avoid quite a few headaches the token you're changing from and the token you're changing to need to be the same length. | ||
__Note:__ In order to avoid quite a few headaches the token you're changing from and the token you're changing to need to be the same length. |
!function (define) { | ||
define(function (require) { | ||
define(function (requir_) { | ||
var jQuery; | ||
if (!jQuery && typeof require === 'function') { | ||
jQuery = require('jquery'); | ||
if (!jQuery && typeof requir_ === 'function') { | ||
jQuery = requir_('jquery'); | ||
} | ||
}); | ||
}(); |
@@ -87,3 +87,3 @@ var should = require('chai').should(); | ||
{ | ||
from: 'require', | ||
from: 'requir_', | ||
to: '_derec_' | ||
@@ -90,0 +90,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
754309
21142
+ Addedesprima-fb@10001.1.0-dev-harmony-fb(transitive)
+ Addedestraverse@1.9.3(transitive)
- Removedesprima-fb@3001.1.0-dev-harmony-fb(transitive)
- Removedestraverse@1.5.1(transitive)
Updatedestraverse@~1.9.1