evolit 0.1.0-alpha.1 → 0.1.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -38,7 +38,7 @@ Supported authored module extensions:
38
38
 
39
39
  ```sh
40
40
  yarn install
41
- npx evolit@alpha my-site
41
+ npx -p evolit@alpha evolit my-site
42
42
  ```
43
43
 
44
44
  Additional commands:
@@ -61,7 +61,8 @@ yarn start
61
61
  The framework ships a starter at `templates/default`.
62
62
 
63
63
  `evolit <directory>` copies that template, writes a site `package.json`, and leaves the app ready
64
- to run. `evolit init <directory>` is supported as an explicit equivalent.
64
+ to run. `evolit init <directory>` is supported as an explicit equivalent. The `npx -p … evolit`
65
+ form keeps the CLI arguments unambiguous across npm versions.
65
66
 
66
67
  ## Architecture
67
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evolit",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "A convention-driven application framework for LitSX and web components.",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@4.10.3",
package/src/cli.js CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  import path from "node:path";
4
4
  import process from "node:process";
5
- import { buildProject } from "./build.js";
6
5
  import { scaffoldSite } from "./scaffold.js";
7
- import { createDevServer, createStartServer } from "./server.js";
8
6
 
9
7
  function parseArguments(argv) {
10
8
  const [command, ...rest] = argv;
@@ -55,12 +53,14 @@ async function run() {
55
53
  }
56
54
 
57
55
  if (command === "build") {
56
+ const { buildProject } = await import("./build.js");
58
57
  const manifestPath = await buildProject(projectRoot);
59
58
  console.log(`Built evolit app: ${path.relative(projectRoot, manifestPath)}`);
60
59
  return;
61
60
  }
62
61
 
63
62
  if (command === "start") {
63
+ const { createStartServer } = await import("./server.js");
64
64
  const server = await createStartServer(projectRoot, options);
65
65
  await server.listen();
66
66
  console.log(`evolit start listening on http://localhost:${server.port}`);
@@ -68,6 +68,7 @@ async function run() {
68
68
  }
69
69
 
70
70
  if (command === "dev") {
71
+ const { createDevServer } = await import("./server.js");
71
72
  const server = await createDevServer(projectRoot, options);
72
73
  await server.listen();
73
74
  console.log(`evolit dev listening on http://localhost:${server.port}`);
package/src/scaffold.js CHANGED
@@ -49,6 +49,10 @@ export async function scaffoldSite(targetDirectory, options = {}) {
49
49
  }
50
50
 
51
51
  await copyDirectory(TEMPLATE_ROOT, absoluteTargetDirectory);
52
+ await fs.rename(
53
+ path.join(absoluteTargetDirectory, "yarnrc.yml.template"),
54
+ path.join(absoluteTargetDirectory, ".yarnrc.yml"),
55
+ );
52
56
  await writeSitePackageJson(absoluteTargetDirectory, siteName);
53
57
  await fs.writeFile(
54
58
  path.join(absoluteTargetDirectory, "evolit.config.js"),
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules