umpordez 1.3.1 → 1.3.2
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/.claude/settings.local.json +2 -1
- package/create.mjs +14 -1
- package/package.json +1 -1
- package/template/gitignore +13 -0
- package/template/mobile/{{PROJECT_SLUG}}/gitignore +29 -0
- package/update.mjs +7 -1
package/create.mjs
CHANGED
|
@@ -422,6 +422,12 @@ function replacePlaceholders(content, replacements) {
|
|
|
422
422
|
// config, git ignore) doesn't belong to any single sub-app.
|
|
423
423
|
const ALWAYS_KEEP = new Set(['.claude']);
|
|
424
424
|
|
|
425
|
+
// Top-level files kept for every preset (not tied to any sub-app).
|
|
426
|
+
// The gitignore ships under a dot-less name because npm strips any
|
|
427
|
+
// file literally named `.gitignore` from published tarballs — it is
|
|
428
|
+
// renamed back to `.gitignore` during the file-rename pass below.
|
|
429
|
+
const ALWAYS_KEEP_FILES = new Set(['gitignore', '.editorconfig']);
|
|
430
|
+
|
|
425
431
|
export async function copyTemplate(outputDir, preset) {
|
|
426
432
|
const presetDef = PRESETS[preset];
|
|
427
433
|
await fs.promises.cp(TEMPLATE_DIR, outputDir, { recursive: true });
|
|
@@ -477,7 +483,8 @@ export async function copyTemplate(outputDir, preset) {
|
|
|
477
483
|
if (entry.isDirectory()) {
|
|
478
484
|
continue;
|
|
479
485
|
}
|
|
480
|
-
if (!allowedFiles.has(entry.name)
|
|
486
|
+
if (!allowedFiles.has(entry.name)
|
|
487
|
+
&& !ALWAYS_KEEP_FILES.has(entry.name)) {
|
|
481
488
|
await fs.promises.rm(path.join(outputDir, entry.name));
|
|
482
489
|
}
|
|
483
490
|
}
|
|
@@ -579,6 +586,12 @@ export async function createProject() {
|
|
|
579
586
|
const newPath = path.join(dir, newName);
|
|
580
587
|
await fs.promises.rename(filePath, newPath);
|
|
581
588
|
}
|
|
589
|
+
|
|
590
|
+
// Restore the dot on gitignore files. They ship dot-less because
|
|
591
|
+
// npm strips any file named `.gitignore` from published packages.
|
|
592
|
+
if (basename === 'gitignore') {
|
|
593
|
+
await fs.promises.rename(filePath, path.join(dir, '.gitignore'));
|
|
594
|
+
}
|
|
582
595
|
}
|
|
583
596
|
|
|
584
597
|
// Path-segment renames (e.g. mobile/{{PROJECT_SLUG}}/)
|
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
node_modules/
|
|
2
|
+
.expo/
|
|
3
|
+
dist/
|
|
4
|
+
web-build/
|
|
5
|
+
*.log
|
|
6
|
+
|
|
7
|
+
# Native build artifacts
|
|
8
|
+
ios/build/
|
|
9
|
+
ios/Pods/
|
|
10
|
+
ios/Podfile.lock
|
|
11
|
+
android/build/
|
|
12
|
+
android/app/build/
|
|
13
|
+
android/.gradle/
|
|
14
|
+
android/local.properties
|
|
15
|
+
|
|
16
|
+
# Local env / signing keys (keep generated builds out of git)
|
|
17
|
+
.env
|
|
18
|
+
.env.local
|
|
19
|
+
google-play-key.json
|
|
20
|
+
*.jks
|
|
21
|
+
*.keystore
|
|
22
|
+
|
|
23
|
+
# Store screenshots (raw captures + framed output — regenerate anytime)
|
|
24
|
+
screenshots/
|
|
25
|
+
|
|
26
|
+
# OS / IDE
|
|
27
|
+
.DS_Store
|
|
28
|
+
.idea/
|
|
29
|
+
.vscode/
|
package/update.mjs
CHANGED
|
@@ -143,7 +143,13 @@ function applyPlaceholders(content, replacements) {
|
|
|
143
143
|
|
|
144
144
|
function applyPathPlaceholders(p, slug) {
|
|
145
145
|
// Mirrors create.mjs renameDirs + per-file substitution.
|
|
146
|
-
|
|
146
|
+
let out = p.replaceAll('{{PROJECT_SLUG}}', slug);
|
|
147
|
+
// Gitignore files ship dot-less (npm strips `.gitignore` from
|
|
148
|
+
// published packages) and are restored to `.gitignore` on write.
|
|
149
|
+
if (path.basename(out) === 'gitignore') {
|
|
150
|
+
out = path.join(path.dirname(out), '.gitignore');
|
|
151
|
+
}
|
|
152
|
+
return out;
|
|
147
153
|
}
|
|
148
154
|
|
|
149
155
|
/**
|