Created
January 5, 2016 16:38
-
-
Save podhmo/c17f6e7b720019787729 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
var benv = require('benv'); | |
function setup(cb){ | |
benv.setup(function(){ | |
global.Node = window.Node; | |
benv.expose({ | |
angular: benv.require('./node_modules/angular/angular.js', 'angular') | |
}); | |
cb(); | |
}); | |
} | |
setup(function(){ | |
console.log('window is', typeof window); | |
console.log('document is', typeof document); | |
console.log('angular is', typeof angular); | |
console.log('window.angular === angular', window.angular === angular); | |
}); |
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
{ | |
"name": "api-test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"angular": "^1.4.8" | |
}, | |
"devDependencies": { | |
"benv": "^3.0.0" | |
} | |
} |
Author
podhmo
commented
Jan 5, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment