@lightfish/cli 0.0.6 → 0.0.7
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/dist/create-lightfish.js
CHANGED
|
@@ -13,13 +13,20 @@ import prompts3 from "prompts";
|
|
|
13
13
|
import path from "path";
|
|
14
14
|
import fs from "fs-extra";
|
|
15
15
|
var SKIP_NAMES = /* @__PURE__ */ new Set([".git", "node_modules", "dist"]);
|
|
16
|
+
var RESTORE_MAP = {
|
|
17
|
+
_gitignore: ".gitignore",
|
|
18
|
+
_gitattributes: ".gitattributes",
|
|
19
|
+
_npmignore: ".npmignore",
|
|
20
|
+
_gitkeep: ".gitkeep"
|
|
21
|
+
};
|
|
16
22
|
async function copyLocalTemplate(srcDir, targetDir) {
|
|
17
23
|
await fs.ensureDir(targetDir);
|
|
18
24
|
const entries = await fs.readdir(srcDir, { withFileTypes: true });
|
|
19
25
|
for (const entry of entries) {
|
|
20
26
|
if (SKIP_NAMES.has(entry.name)) continue;
|
|
21
27
|
const src = path.join(srcDir, entry.name);
|
|
22
|
-
const
|
|
28
|
+
const destName = RESTORE_MAP[entry.name] ?? entry.name;
|
|
29
|
+
const dest = path.join(targetDir, destName);
|
|
23
30
|
if (entry.isDirectory()) {
|
|
24
31
|
await copyLocalTemplate(src, dest);
|
|
25
32
|
} else if (entry.isSymbolicLink()) {
|
package/dist/lightfish.js
CHANGED
|
@@ -14,13 +14,20 @@ import prompts3 from "prompts";
|
|
|
14
14
|
import path from "path";
|
|
15
15
|
import fs from "fs-extra";
|
|
16
16
|
var SKIP_NAMES = /* @__PURE__ */ new Set([".git", "node_modules", "dist"]);
|
|
17
|
+
var RESTORE_MAP = {
|
|
18
|
+
_gitignore: ".gitignore",
|
|
19
|
+
_gitattributes: ".gitattributes",
|
|
20
|
+
_npmignore: ".npmignore",
|
|
21
|
+
_gitkeep: ".gitkeep"
|
|
22
|
+
};
|
|
17
23
|
async function copyLocalTemplate(srcDir, targetDir) {
|
|
18
24
|
await fs.ensureDir(targetDir);
|
|
19
25
|
const entries = await fs.readdir(srcDir, { withFileTypes: true });
|
|
20
26
|
for (const entry of entries) {
|
|
21
27
|
if (SKIP_NAMES.has(entry.name)) continue;
|
|
22
28
|
const src = path.join(srcDir, entry.name);
|
|
23
|
-
const
|
|
29
|
+
const destName = RESTORE_MAP[entry.name] ?? entry.name;
|
|
30
|
+
const dest = path.join(targetDir, destName);
|
|
24
31
|
if (entry.isDirectory()) {
|
|
25
32
|
await copyLocalTemplate(src, dest);
|
|
26
33
|
} else if (entry.isSymbolicLink()) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
!.vscode/extensions.json
|
|
17
|
+
.idea
|
|
18
|
+
.DS_Store
|
|
19
|
+
*.suo
|
|
20
|
+
*.ntvs*
|
|
21
|
+
*.njsproj
|
|
22
|
+
*.sln
|
|
23
|
+
*.sw?
|