create-zoijs 0.1.3 → 0.1.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to `create-zoijs` are documented here.
4
4
 
5
+ ## 0.1.4 — 2026-06-27
6
+
7
+ Scaffolded apps now come with editor config for a great out-of-the-box experience —
8
+ no toolchain required. The CLI API and the app code are unchanged.
9
+
10
+ - **`.vscode/extensions.json`** (templates `app`, `basic`, `typescript`, `library`) —
11
+ recommends a highlighter for `` html`` `` templates (`bierner.lit-html`), the ESLint
12
+ extension, and Prettier. VS Code suggests them when you open the project.
13
+ - **`jsconfig.json`** (templates `app`, `basic`) — IntelliSense (autocomplete, hover,
14
+ go-to-definition) from the types every Zoijs package ships, with no build step. Flip
15
+ `checkJs` on to also type-check your JavaScript. (The `typescript` and `library`
16
+ templates already carry a `tsconfig.json`.)
17
+ - See the [Editor Setup guide](https://zoijs.dev/editor-setup).
18
+
5
19
  ## 0.1.3 — 2026-06-26
6
20
 
7
21
  Three new templates (now five total). No change to existing templates or the CLI
@@ -78,6 +78,10 @@ export function ensureTargetAvailable(targetDir) {
78
78
  const TEXT_EXT = new Set([".js", ".ts", ".mjs", ".html", ".css", ".json", ".md", ".txt", ".svg"]);
79
79
  const isText = (file) => file === "_gitignore" || TEXT_EXT.has(path.extname(file));
80
80
 
81
+ // npm strips/renames files and dirs that start with a dot from a published package,
82
+ // so templates ship them with a "_" prefix and we restore the dot name on copy.
83
+ const RENAME = { _gitignore: ".gitignore", _vscode: ".vscode" };
84
+
81
85
  function applyTokens(content, tokens) {
82
86
  return content.replaceAll("{{APP_NAME}}", tokens.APP_NAME).replaceAll("{{APP_TITLE}}", tokens.APP_TITLE);
83
87
  }
@@ -86,9 +90,7 @@ function copyDir(srcDir, destDir, tokens, written) {
86
90
  fs.mkdirSync(destDir, { recursive: true });
87
91
  for (const entry of fs.readdirSync(srcDir, { withFileTypes: true })) {
88
92
  const srcPath = path.join(srcDir, entry.name);
89
- // npm strips a literal ".gitignore" from published packages, so templates
90
- // ship it as "_gitignore" and we rename it on copy.
91
- const destName = entry.name === "_gitignore" ? ".gitignore" : entry.name;
93
+ const destName = RENAME[entry.name] ?? entry.name; // restore dot-prefixed names
92
94
  const destPath = path.join(destDir, destName);
93
95
  if (entry.isDirectory()) {
94
96
  copyDir(srcPath, destPath, tokens, written);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-zoijs",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Create a new Zoijs app with one command. Plain HTML, CSS, and JavaScript — no build step.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "bierner.lit-html",
4
+ "dbaeumer.vscode-eslint",
5
+ "esbenp.prettier-vscode"
6
+ ]
7
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ // jsconfig.json — gives your editor IntelliSense (autocomplete, hover, go-to-
3
+ // definition) for Zoijs and the DOM, from the types every package ships. No build
4
+ // step, no TypeScript migration. Flip "checkJs" to true to also TYPE-CHECK your
5
+ // JavaScript against those types (or add `// @ts-check` to a single file).
6
+ "compilerOptions": {
7
+ "module": "ESNext",
8
+ "moduleResolution": "bundler",
9
+ "target": "ES2022",
10
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
11
+ "checkJs": false,
12
+ "strict": true,
13
+ "skipLibCheck": true
14
+ },
15
+ "include": ["src"]
16
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "bierner.lit-html",
4
+ "dbaeumer.vscode-eslint",
5
+ "esbenp.prettier-vscode"
6
+ ]
7
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ // jsconfig.json — gives your editor IntelliSense (autocomplete, hover, go-to-
3
+ // definition) for Zoijs and the DOM, from the types every package ships. No build
4
+ // step, no TypeScript migration. Flip "checkJs" to true to also TYPE-CHECK your
5
+ // JavaScript against those types (or add `// @ts-check` to a single file).
6
+ "compilerOptions": {
7
+ "module": "ESNext",
8
+ "moduleResolution": "bundler",
9
+ "target": "ES2022",
10
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
11
+ "checkJs": false,
12
+ "strict": true,
13
+ "skipLibCheck": true
14
+ },
15
+ "include": ["src"]
16
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "bierner.lit-html",
4
+ "dbaeumer.vscode-eslint",
5
+ "esbenp.prettier-vscode"
6
+ ]
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "bierner.lit-html",
4
+ "dbaeumer.vscode-eslint",
5
+ "esbenp.prettier-vscode"
6
+ ]
7
+ }