Explorar el Código

Update to fully working state with errors.

Lee Morgan hace 6 meses
padre
commit
89962342e0
Se han modificado 5 ficheros con 8 adiciones y 48 borrados
  1. 1 0
      build.html
  2. 4 4
      createHtml.js
  3. 1 1
      index.css
  4. 1 42
      index.html
  5. 1 1
      start.html

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
build.html


+ 4 - 4
createHtml.js

@@ -4,16 +4,16 @@ import htmlMinifier from "html-minifier-terser";
 import fsSync from "fs";
 
 const fs = fsSync.promises;
-const isProduction = false;
+const isProduction = true;
 
 const esbuildProm = esbuild.build({
-    entryPoints: [`${import.meta.dirname}/js/index.js`, `${import.meta.dirname}/css/index.css`],
+    entryPoints: [`${import.meta.dirname}/index.js`, `${import.meta.dirname}/index.css`],
     bundle: true,
     minify: isProduction,
     write: false,
     outdir: import.meta.dirname
 });
-const htmlProm = await fs.readFile(`${import.meta.dirname}/index.html`, "utf-8");
+const htmlProm = await fs.readFile(`${import.meta.dirname}/start.html`, "utf-8");
 const [build, html] = await Promise.all([esbuildProm, htmlProm]);
 
 let js, css;
@@ -38,5 +38,5 @@ let data = await htmlMinifier.minify(html, {
 data = data.replace("<script></script>", `<script>${js}</script>`)
 data = data.replace("<style></style>", `<style>${css}</style>`)
 
-await fs.writeFile(`${import.meta.dirname}/build.html`, data);
+await fs.writeFile(`${import.meta.dirname}/index.html`, data);
 console.timeEnd("Build time");

+ 1 - 1
index.css

@@ -1,4 +1,4 @@
-*{margin:0;padding:0;box-sizing:border-box};
+*{margin:0;padding:0;box-sizing:border-box;}
 
 html, body{
     height: 100vh;

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 42
index.html


+ 1 - 1
display.html → start.html

@@ -22,7 +22,7 @@
                             <p id="temp"></p>
                             <p id="feels"></p>
                             <p id="wind"></p>
-                            <p id="humidity"</p>
+                            <p id="humidity"></p>
                         </div>
                     </div>
                 </div>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio