Skip to content

Commit 0366444

Browse files
rdreysokra
authored andcommitted
Renamed *libary* to *library*
Conflicts: test/browsertest/build.js
1 parent cbf909e commit 0366444

File tree

21 files changed

+38
-37
lines changed

21 files changed

+38
-37
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/test/js
33
/test/browsertest/js
44
/examples/*/js
5+
.DS_Store

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ Options:
326326
--filenames Output Filenames Into File [boolean] [default: false]
327327
--options Options JSON File [string]
328328
--public-prefix Path Prefix For JavaScript Loading [string]
329-
--libary Stores the exports into this variable [string]
329+
--library Stores the exports into this variable [string]
330330
--colors Output Stats with colors [boolean] [default: false]
331331
--single Disable lazy loading [boolean] [default: false]
332332
--json Output Stats as JSON [boolean] [default: false]
@@ -376,9 +376,9 @@ You can also save this options object in a JSON file and use it with the shell c
376376
// path to create the chunks url relative to page
377377
// deprecated name: scriptSrcPrefix
378378

379-
libary: "mylib", // default: null
379+
library: "mylib", // default: null
380380
// store the exports of the entrace module in a variable of this name
381-
// use this to create a libary from webpack
381+
// use this to create a library from webpack
382382

383383
includeFilenames: true, // default: false
384384
// include the filename of each module as comment before the module

bin/webpack.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ var argv = require("optimist")
3333
.string("public-prefix")
3434
.describe("public-prefix", "Path Prefix For JavaScript Loading")
3535

36-
.string("libary")
37-
.describe("libary", "Stores the exports into this variable")
36+
.string("library")
37+
.describe("library", "Stores the exports into this variable")
3838

3939
.boolean("colors")
4040
.describe("colors", "Output Stats with colors")
@@ -145,8 +145,8 @@ if(argv.filenames) {
145145
options.includeFilenames = true;
146146
}
147147

148-
if(argv.libary) {
149-
options.libary = argv.libary;
148+
if(argv.library) {
149+
options.library = argv.library;
150150
}
151151

152152
if(argv.alias) {

lib/webpack.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = function webpackMain(context, moduleName, options, callback) {
3939
if(!options.events) options.events = new (require("events").EventEmitter)();
4040

4141
if(!options.outputJsonpFunction)
42-
options.outputJsonpFunction = "webpackJsonp" + (options.libary || "");
42+
options.outputJsonpFunction = "webpackJsonp" + (options.library || "");
4343
options.publicPrefix = options.publicPrefix || "";
4444

4545
options.context = options.context || context;
@@ -282,7 +282,7 @@ function webpack(context, moduleName, options, callback) {
282282
var hash;
283283
try {
284284
hash = new (require("crypto").Hash)("md5");
285-
hash.update(JSON.stringify(options.libary || ""));
285+
hash.update(JSON.stringify(options.library || ""));
286286
hash.update(JSON.stringify(options.outputPostfix));
287287
hash.update(JSON.stringify(options.outputJsonpFunction));
288288
hash.update(JSON.stringify(options.publicPrefix));
@@ -320,10 +320,10 @@ function webpack(context, moduleName, options, callback) {
320320
else
321321
hash = "";
322322

323-
// if it should be a libary, we prepend a variable name
324-
if(options.libary) {
323+
// if it should be a library, we prepend a variable name
324+
if(options.library) {
325325
buffer.push("/******/var ");
326-
buffer.push(options.libary);
326+
buffer.push(options.library);
327327
buffer.push("=\n");
328328
}
329329

test/browsertest/build.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ console.log("compile scripts...");
2828
var extraArgsNoWatch = extraArgs.slice(0);
2929
var watchIndex = extraArgsNoWatch.indexOf("--watch");
3030
if(watchIndex != -1) extraArgsNoWatch.splice(watchIndex, 1);
31-
// node ../../bin/webpack --colors --single --libary libary1 node_modules/libary1 js/libary1.js
32-
var libary1 = cp.spawn("node", join(["../../bin/webpack.js", "--colors", "--single", "--libary", "libary1",
33-
"node_modules/libary1", "js/libary1.js"], extraArgsNoWatch));
34-
bindOutput(libary1);
35-
libary1.on("exit", function(code) {
31+
// node ../../bin/webpack --colors --single --library library1 node_modules/library1 js/library1.js
32+
var library1 = cp.spawn("node", join(["../../bin/webpack.js", "--colors", "--single", "--library", "library1",
33+
"node_modules/library1", "js/library1.js"], extraArgsNoWatch));
34+
bindOutput(library1);
35+
library1.on("exit", function(code) {
3636
if(code === 0) {
3737
// node ../../bin/webpack --colors --alias vm=vm-browserify --workers --public-prefix js/ lib/index js/web.js
3838
var main = cp.spawn("node", join(["../../bin/webpack.js", "--colors", "--alias", "vm=vm-browserify", "--workers",
3939
"--public-prefix", "js/", "lib/index", "js/web.js"], extraArgs));
4040
bindOutput(main);
4141
}
4242
});
43-
var libary2 = cp.spawn("node", join(["../../bin/webpack.js", "--colors", "--libary", "libary2",
44-
"--public-prefix", "js/", "--options", "libary2config.js", "node_modules/libary2", "js/libary2.js"], extraArgsNoWatch));
45-
bindOutput(libary2);
43+
var library2 = cp.spawn("node", join(["../../bin/webpack.js", "--colors", "--library", "library2",
44+
"--public-prefix", "js/", "--options", "library2config.js", "node_modules/library2", "js/library2.js"], extraArgsNoWatch));
45+
bindOutput(library2);

test/browsertest/lib/index.web.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ function test(cond, message) {
66
if(!cond) throw new Error(message);
77
}
88

9-
// load tests from libary1, with script loader
10-
require("script!../js/libary1.js");
9+
// load tests from library1, with script loader
10+
require("script!../js/library1.js");
1111

1212
// Buildin 'style' loader adds css to document
1313
require("../css/stylesheet.css");
@@ -25,15 +25,15 @@ function testCase(number) {
2525
}
2626

2727
describe("main", function() {
28-
it("should load libary1 with script-loader", function() {
29-
should.exist(window.libary1);
30-
window.libary1.should.be.eql(true);
28+
it("should load library1 with script-loader", function() {
29+
should.exist(window.library1);
30+
window.library1.should.be.eql(true);
3131
});
3232

33-
it("should load libary1 with script-loader", function() {
34-
should.exist(window.libary2);
35-
should.exist(window.libary2.ok);
36-
window.libary2.ok.should.be.eql(true);
33+
it("should load library1 with script-loader", function() {
34+
should.exist(window.library2);
35+
should.exist(window.library2.ok);
36+
window.library2.ok.should.be.eql(true);
3737
});
3838

3939
describe("resolving", function() {

test/browsertest/node_modules/libary1/index.js renamed to test/browsertest/node_modules/library1/index.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

test/browsertest/node_modules/libary1/lib/component.js renamed to test/browsertest/node_modules/library1/lib/component.js

File renamed without changes.

0 commit comments

Comments
 (0)