forked from novus/nvd3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Meteor export file so that the nv object is available globally in…
… Meteor apps.
- Loading branch information
Showing
5 changed files
with
30 additions
and
1 deletion.
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
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,4 @@ | ||
/*global nv:true*/ // Meteor creates a file-scope global for exporting. This comment prevents a potential JSHint warning. | ||
nv = window.nv; | ||
delete window.nv; | ||
|
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 |
---|---|---|
|
@@ -13,5 +13,12 @@ Package.on_use(function (api) { | |
api.use('d3js:[email protected]', 'client'); | ||
api.add_files('build/nv.d3.js', 'client'); | ||
api.add_files('build/nv.d3.css', 'client'); | ||
api.add_files('meteor/export.js', 'client'); | ||
api.export("nv"); | ||
}); | ||
}); | ||
Package.onTest(function(api) { | ||
api.use(['tinytest', 'test-helpers']); | ||
api.use('d3js:d3', 'client'); | ||
api.addFiles(['build/nv.d3.js', 'meteor/export.js'], "client"); | ||
api.addFiles('test/tinytest/nv-is-defined-test.js', "client"); | ||
}); |
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,6 @@ | ||
// nv-is-defined-test.js | ||
|
||
Tinytest.add('nv object is defined', function(test) { | ||
test.isNotUndefined(nv, 'nv is undefined at global scope for Meteor'); | ||
}); | ||
|