index.html 542 B

1234567891011121314151617181920212223242526
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Node-webkit-based module test</title>
  6. <script>
  7. function nwModuleTest(){
  8. var util = require('util');
  9. var moduleFolder = require('nw.gui').App.argv[0];
  10. try {
  11. require(moduleFolder);
  12. } catch(e) {
  13. if( process.platform !== 'win32' ){
  14. util.log('nw-pre-gyp error:');
  15. util.log(e.stack);
  16. }
  17. process.exit(1);
  18. }
  19. process.exit(0);
  20. }
  21. </script>
  22. </head>
  23. <body onload="nwModuleTest()">
  24. <h1>Node-webkit-based module test</h1>
  25. </body>
  26. </html>