Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

barely-a-dev-server

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

barely-a-dev-server - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

package.json
{
"name": "barely-a-dev-server",
"version": "0.2.2",
"version": "0.2.3",
"type": "module",

@@ -5,0 +5,0 @@ "description": "",

@@ -22,3 +22,5 @@ import * as esbuild from "esbuild";

console.log(`Starting esbuild with ${entryPoints.length} entry point(s).`);
console.log(
`[barely-a-dev-server] Starting esbuild with ${entryPoints.length} entry point(s).`
);
return (currentBuildResult = esbuild.build({

@@ -25,0 +27,0 @@ target: "es2020",

@@ -1,2 +0,2 @@

import { copyFileSync, mkdirSync } from "fs";
import { copyFileSync, mkdirSync, rmdirSync, rmSync } from "fs";
import { dirname, join } from "path";

@@ -52,2 +52,20 @@ import { restartEsbuild } from "./esbuild.js";

// TODO: Is there a succinct way to clear the `outDir` contents without
// removing the `dir` itself (e.g. in case someone has the folder open in
// Finder)?
rmSync(outDir, { recursive: true, force: true }); // Clear stale output files.
if (!dev) {
// `esbuild` output files will take precedence over static files, so we copy
// them first and let `esbuild` override if needed.
console.log("\n[barely-a-dev-server] Copying static files...\n");
for (const relativePath of await listFiles(entryRoot, () => true)) {
console.log(" " + relativePath);
mkdirSync(dirname(join(outDir, relativePath)), { recursive: true });
copyFileSync(join(entryRoot, relativePath), join(outDir, relativePath));
}
console.log("");
// TODO: Switch to this once `node` 16 is the default in Codespaces:
// await fsPromises.cp(entryRoot, outDir, { recursive: true });
}
await restartEsbuild(entryRoot, outDir, dev, esbuildOptions);

@@ -60,10 +78,3 @@ if (dev) {

}).start();
} else {
for (const relativePath of await listFiles(entryRoot, () => true)) {
mkdirSync(dirname(join(outDir, relativePath)), { recursive: true });
copyFileSync(join(entryRoot, relativePath), join(outDir, relativePath));
}
// TODO: Switch to this once `node` 16 is the default in Codespaces:
// await fsPromises.cp(entryRoot, outDir, { recursive: true });
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc