Merge branch 'master' into wip-0.8
Conflicts: lib/buildModule.js
This commit is contained in:
commit
cbf909e9db
|
@ -0,0 +1,2 @@
|
|||
* text=auto
|
||||
bin/* eol=lf
|
|
@ -1,4 +1,4 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- 0.6
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.6
|
||||
- 0.8
|
|
@ -680,7 +680,7 @@ You are also welcome to correct any spelling mistakes or any language issues, be
|
|||
|
||||
## Future plans
|
||||
|
||||
see [https://github.com/webpack/webpack/wiki/Ideas](wiki Ideas)
|
||||
see [wiki Ideas](https://github.com/webpack/webpack/wiki/Ideas)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"foobar": 1234
|
||||
{
|
||||
"foobar": 1234
|
||||
}
|
|
@ -85,7 +85,7 @@ function buildModule(context, request,
|
|||
try {
|
||||
deps = parse(source, options.parse);
|
||||
} catch(e) {
|
||||
callback(new Error("File \"" + request + "\" parsing failed: " + e), extraResults);
|
||||
callback(new Error("File \"" + request + "\" parsing failed: " + e.stack), extraResults);
|
||||
return;
|
||||
}
|
||||
profile && (profile.end = new Date().getTime());
|
||||
|
|
10
lib/parse.js
10
lib/parse.js
|
@ -81,8 +81,8 @@ function walkStatement(options, context, statement) {
|
|||
|
||||
// Declarations
|
||||
case "FunctionDeclaration":
|
||||
if(options.overwrites.hasOwnProperty(statement.name)) {
|
||||
context.overwrite.push(statement.name);
|
||||
if(options.overwrites.hasOwnProperty(statement.id.name)) {
|
||||
context.overwrite.push(statement.id.name);
|
||||
}
|
||||
var oldInTry = context.inTry;
|
||||
context.inTry = false;
|
||||
|
@ -173,6 +173,11 @@ function walkExpression(options, context, expression) {
|
|||
expression.argument.type === "Identifier" &&
|
||||
expression.argument.name === "require")
|
||||
break;
|
||||
if(expression.operator === "typeof" &&
|
||||
expression.argument &&
|
||||
expression.argument.type === "Identifier" &&
|
||||
expression.argument.name === "module")
|
||||
break;
|
||||
walkExpression(options, context, expression.argument);
|
||||
break;
|
||||
case "BinaryExpression":
|
||||
|
@ -351,6 +356,7 @@ function walkExpression(options, context, expression) {
|
|||
expression.arguments.length == 1 &&
|
||||
expression.callee.type === "Identifier" &&
|
||||
expression.callee.name === "define") {
|
||||
context.requires = context.requires || [];
|
||||
context.requires.push({
|
||||
name: "__webpack_amd_define",
|
||||
append: "(module)",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webpack",
|
||||
"version": "0.7.12",
|
||||
"version": "0.7.16",
|
||||
"author": "Tobias Koppers @sokra",
|
||||
"description": "Packs CommonJs/AMD Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loading of js, json, jade, coffee, css, ... out of the box and more with custom loaders.",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
condition = true
|
||||
obj =
|
||||
text: "coffee test"
|
||||
|
||||
condition = true
|
||||
obj =
|
||||
text: "coffee test"
|
||||
|
||||
module.exports = obj.text if condition?
|
Loading…
Reference in New Issue