Skip to content

Commit 76563b7

Browse files
committed
change exported function name to Shared, inner object name to share
1 parent ee2dc4a commit 76563b7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lib/Shared.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ var parseRange = require("range-parser");
22
var pathIsAbsolute = require("path-is-absolute");
33
var MemoryFileSystem = require("memory-fs");
44

5-
module.exports = function shared(context) {
6-
var shared = {
5+
module.exports = function Shared(context) {
6+
var share = {
77
setOptions: function(options) {
88
if(!options) options = {};
99
if(typeof options.watchOptions === "undefined") options.watchOptions = {};
10-
if(typeof options.reporter !== "function") options.reporter = shared.defaultReporter;
10+
if(typeof options.reporter !== "function") options.reporter = share.defaultReporter;
1111
if(typeof options.log !== "function") options.log = console.log.bind(console);
1212
if(typeof options.warn !== "function") options.warn = console.warn.bind(console);
1313
if(typeof options.watchDelay !== "undefined") {
@@ -117,7 +117,7 @@ module.exports = function shared(context) {
117117
// In lazy mode, we may issue another rebuild
118118
if(context.forceRebuild) {
119119
context.forceRebuild = false;
120-
shared.rebuild();
120+
share.rebuild();
121121
}
122122
},
123123
compilerInvalid: function() {
@@ -167,12 +167,12 @@ module.exports = function shared(context) {
167167
},
168168
waitUntilValid: function(callback) {
169169
callback = callback || function() {};
170-
shared.ready(callback, {});
170+
share.ready(callback, {});
171171
},
172172
invalidate: function(callback) {
173173
callback = callback || function() {};
174174
if(context.watching) {
175-
shared.ready(callback, {});
175+
share.ready(callback, {});
176176
context.watching.invalidate();
177177
} else {
178178
callback();
@@ -184,14 +184,14 @@ module.exports = function shared(context) {
184184
else callback();
185185
}
186186
};
187-
shared.setOptions(context.options);
188-
shared.setFs(context.compiler);
187+
share.setOptions(context.options);
188+
share.setFs(context.compiler);
189189

190-
context.compiler.plugin("done", shared.compilerDone);
191-
context.compiler.plugin("invalid", shared.compilerInvalid);
192-
context.compiler.plugin("watch-run", shared.compilerInvalid);
193-
context.compiler.plugin("run", shared.compilerInvalid);
190+
context.compiler.plugin("done", share.compilerDone);
191+
context.compiler.plugin("invalid", share.compilerInvalid);
192+
context.compiler.plugin("watch-run", share.compilerInvalid);
193+
context.compiler.plugin("run", share.compilerInvalid);
194194

195-
shared.startWatch();
196-
return shared;
195+
share.startWatch();
196+
return share;
197197
};

0 commit comments

Comments
 (0)