Created
October 6, 2020 11:56
-
-
Save debugmodedotnet/dee70a3e3b13a92b8d216deb4db69fe1 to your computer and use it in GitHub Desktop.
abc.js
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
const domino = require('domino'); | |
//const domino = require('@angular/platform-server/node_modules/domino'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const template = fs.readFileSync('dist/active-directory-javascript-singlepageapp-angular/browser/index.html').toString(); | |
const win = domino.createWindow(template); | |
global['window'] = win; | |
global['document'] = win.document; | |
global['DOMTokenList'] = win.DOMTokenList; | |
global['Node'] = win.Node; | |
global['Text'] = win.Text; | |
global['HTMLElement'] = win.HTMLElement; | |
global['navigator'] = win.navigator; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment