multi-file support

This commit is contained in:
Michael Peters 2022-10-02 20:25:22 -07:00
parent a6cffe429e
commit 8be8a9d72a
3 changed files with 16 additions and 17 deletions

View File

@ -2,23 +2,8 @@
<html>
<head>
<title>I love NW.js</title>
<style>
body {
color: #fff;
background-color: #000;
}
</style>
<script>
const uuidv4 = require('uuid').v4;
console.log('uuidv4:', uuidv4())
// Don't show the window until it's loaded so that we don't get a white flash
const gui = require('nw.gui');
onload = function() {
gui.Window.get().show();
}
</script>
<link rel="stylesheet" href="./styles.css" type="text/css"></style>
<script src="./script.js"></script>
</head>
<body>
<h1>NW.js is great!</h1>

9
script.js Normal file
View File

@ -0,0 +1,9 @@
const uuidv4 = require('uuid').v4;
console.log('uuidv4:', uuidv4())
// Don't show the window until it's loaded so that we don't get a white flash
const gui = require('nw.gui');
onload = function() {
gui.Window.get().show();
}

5
styles.css Normal file
View File

@ -0,0 +1,5 @@
body {
color: #fff;
background-color: #000;
}