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

Commitce7cbc8

Browse files
committed
- Added deprecation warning for client-side bundlers
- Updated package.json for node v0.10- Removed tests for client-side bundlers- Updated .travis.yml for node v0.10- Updated README
1 parentdf5285a commitce7cbc8

18 files changed

+198
-351
lines changed

‎.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language:node_js
22
node_js:
33
-0.8
4-
-0.9
4+
-"0.10"
55

66
script:
77
-npm test

‎CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
##Changelog
22

3+
###v1.1.2
4+
- Added deprecation warning for client-side bundlers
5+
- Updated package.json for node v0.10
6+
37
###v1.1.1
48
- Fixed bug with modules that had a comment on the last line
59

‎README.md

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

1313
Good news to all caffeine-addicts: rewire works also with[Coffee-Script](http://coffeescript.org/). Note that in this case CS needs to be listed in your devDependencies.
1414

15+
If you want to use rewire also on the client-side take a look at[client-side bundlers](https://github.com/jhnns/rewire#client-side-bundlers)
16+
1517
[![Build Status](https://secure.travis-ci.org/jhnns/rewire.png?branch=master)](http://travis-ci.org/jhnns/rewire)
1618
[![Dependency Status](http://david-dm.org/jhnns/rewire/status.png)](http://david-dm.org/jhnns/rewire)
1719
Dependency tracking by[David](http://david-dm.org/)
@@ -131,31 +133,12 @@ Returns the private variable.
131133

132134
##Client-Side Bundlers
133135

134-
rewire comes also with support for client-side bundlers. But since it relies heavily on node's require mechanism it can't be used on the client-side without adding special middleware to the bundling process. Currently supported bundlers are:
135-
136-
-[browserify](https://github.com/substack/node-browserify)@1.x
137-
-[webpack](https://github.com/webpack/webpack) @ 0.8.x
138-
139-
However, expect this feature to be extracted into own bundler-specific modules soon.
140-
141-
**Please note:** Unfortunately the line numbers in stack traces have an offset of +2 (browserify) / +1 (webpack).
142-
This is caused by generated code that is added during the bundling process.
136+
###webpack
137+
See[rewire-webpack](https://github.com/jhnns/rewire-webpack)
143138

144139
###browserify
145-
146140
rewire currently only supportsbrowserify@1.x. I'm not planing to continue development, but if you're relying on this feature[please let me know](https://github.com/jhnns/rewire/issues/13).
147141

148-
```javascript
149-
var b=browserify();
150-
151-
// Add rewire as browserify middleware
152-
b.use(require("rewire").bundlers.browserify);
153-
```
154-
155-
###webpack
156-
157-
see[rewire-webpack](https://github.com/jhnns/rewire-webpack)
158-
159142
<br />
160143

161144
##License

‎lib/bundlers/browserify/browserifyMiddleware.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ var setterSrc = require("../../__set__.js").toString(),
2121
*/
2222
functionbrowserifyMiddleware(b){
2323

24+
console.log("(DEPRECATED) rewire won't support browserify anymore. Please let me know if you're relying on this feature (https://github.com/jhnns/rewire/issues/13)");
25+
2426
/**
2527
* Does actually the injecting of the special code. It is called by browserify for every
2628
* js-module.

‎lib/bundlers/webpack/configureWebpack.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
*@param {Object} options a webpack option object
1010
*/
1111
functionconfigureWebpack(options){
12+
console.log("(DEPRECATED) rewire itself doesn't support webpack anymore. Please use rewire-webpack (https://github.com/jhnns/rewire-webpack)");
13+
1214
options.resolve=options.resolve||{};
1315
options.postLoaders=options.postLoaders||[];
1416
options.resolve.postprocess=options.resolve.postprocess||{};

‎package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" :"rewire",
3-
"version" :"1.1.1",
3+
"version" :"1.1.2",
44
"description" :"Dependency injection for node.js applications",
55
"keywords" : [
66
"dependency",
@@ -28,13 +28,11 @@
2828
"url":"git://github.com/jhnns/rewire.git"
2929
},
3030
"engines" : {
31-
"node" :"<0.10.x"
31+
"node" :"<0.12.x"
3232
},
3333
"devDependencies": {
3434
"mocha":"1.x",
3535
"expect.js":"0.x",
36-
"browserify":"1.x",
37-
"webpack":"0.8.x",
3836
"coffee-script":"1.x"
3937
},
4038
"scripts" : {

‎test/bundlers.browserify.test.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

‎test/bundlers.getRewireRequires.test.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎test/bundlers.webpack.test.js

Lines changed: 0 additions & 71 deletions
This file was deleted.

‎test/bundlers/browserify/index.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎test/bundlers/webpack/index.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp