Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8b9539e

Browse files
author
Johannes
committed
updated comments
1 parentdfe9ba7 commit8b9539e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

‎README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ rewire does **not** load the file and eval the contents to emulate node's requir
1212

1313
**Debugging is fully supported.**
1414

15-
Furthermore rewire comes also with support for[browserify](https://github.com/substack/node-browserify). Thus you can mock your modules in the browser as well.
16-
**Update:***rewire seems to be[broken with browserify >= 1.13.4](https://github.com/jhnns/rewire/issues/5). I'm working on that.*
15+
Furthermore rewire comes also with support for[browserify](https://github.com/substack/node-browserify).
1716

1817
[![Build Status](https://secure.travis-ci.org/jhnns/rewire.png?branch=master)](http://travis-ci.org/jhnns/rewire)
1918

@@ -25,12 +24,12 @@ Installation
2524
`npm install rewire`
2625

2726
**For older node versions:**<br />
28-
rewire is tested with node 0.6.x - 0.8.x. I recommend to run the unit tests via`mocha` in the rewire-folder before using rewire with older node versions.
27+
rewire is tested with node 0.6.x - 0.8.x. I recommend to run the unit tests via`mocha` in the rewire-folder before
28+
using rewire with other node versions.
2929

3030
**Use with[browserify](https://github.com/substack/node-browserify):**<br />
3131

3232
```javascript
33-
// debug=true splits the source in seperate files in chrome's developer tools
3433
var b=require("browserify")({debug:true});
3534

3635
b.use(require("rewire").browserify);

‎lib/browserify/browserifyRewire.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ browserifyRewire.getProxy = function (internalRequire, dirname) {
176176
};
177177

178178
/**
179-
* Scans for global varsan returns an evalable string that declares all globals as a var.
179+
* Scans for global varsand returns an evalable string that declares all globals as a var.
180180
* This way a global variable can be overridden by __set__ without changing the global instance.
181181
* It is executed each time again to include global variables that have been added later.
182182
*

‎lib/browserify/getRewireRequires.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/***
2+
* Searches for rewire(); statements and returns all strings that are between the brackets.
3+
*
4+
*@param {!String} src
5+
*@return {Array}
6+
*/
17
functiongetRewireRequires(src){
28
varresult=[],
39
regExp=/[^a-zA-Z0-9_]rewire\(["'](.+?)["']\)/g,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp