-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recursively check for undefined variables and skip inlining if they e…
…xist
- Loading branch information
Tim Beyer
committed
Aug 5, 2013
1 parent
b2da1f1
commit bf45b3a
Showing
5 changed files
with
83 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var test = require('tap').test; | ||
var browserify = require('browserify'); | ||
var path = require('path'); | ||
|
||
test('dynamically loaded file gets skipped', function (t) { | ||
t.plan(1); | ||
|
||
var b = browserify(); | ||
b.add(__dirname + '/files/dynamic_read_concat'); | ||
b.transform(path.dirname(__dirname)); | ||
|
||
b.bundle(function (err, src) { | ||
if (err) t.fail(err); | ||
else t.ok(true, 'build success'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var test = require('tap').test; | ||
var browserify = require('browserify'); | ||
var path = require('path'); | ||
|
||
test('dynamically loaded file gets skipped', function (t) { | ||
t.plan(1); | ||
|
||
var b = browserify(); | ||
b.add(__dirname + '/files/dynamic_read_no_concat.js'); | ||
b.transform(path.dirname(__dirname)); | ||
|
||
b.bundle(function (err, src) { | ||
if (err) t.fail(err); | ||
else t.ok(true, 'build success'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var fs, | ||
path, | ||
dynamicallyCreatedFilename; | ||
fs = require('fs'); | ||
path = require('path'); | ||
|
||
dynamicallyCreatedFilename = path.join('/files/', 'somefile'); | ||
var stuff = fs.readFileSync(__dirname + dynamicallyCreatedFilename + __dirname); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var fs, | ||
path, | ||
dynamicallyCreatedFilename; | ||
fs = require('fs'); | ||
path = require('path'); | ||
|
||
dynamicallyCreatedFilename = path.join('/files/', 'somefile'); | ||
var stuff = fs.readFileSync(dynamicallyCreatedFilename); |