@nshiab/setup-data-project 1.0.18 → 1.0.21
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 +2 -0
- package/esm/helpers/createFolderStructure.d.ts.map +1 -1
- package/esm/helpers/createFolderStructure.js +6 -2
- package/esm/helpers/installPackagesAndFetchDocs.js +2 -2
- package/package.json +1 -1
- package/script/helpers/createFolderStructure.d.ts.map +1 -1
- package/script/helpers/createFolderStructure.js +6 -2
- package/script/helpers/installPackagesAndFetchDocs.js +2 -2
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFolderStructure.d.ts","sourceRoot":"","sources":["../../src/helpers/createFolderStructure.ts"],"names":[],"mappings":"AAKA,wBAAsB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"createFolderStructure.d.ts","sourceRoot":"","sources":["../../src/helpers/createFolderStructure.ts"],"names":[],"mappings":"AAKA,wBAAsB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,mBA4CrE"}
|
|
@@ -16,8 +16,12 @@ export async function createFolderStructure(selectedPackages) {
|
|
|
16
16
|
}
|
|
17
17
|
const mainTsPath = join(sdaFolder, "main.ts");
|
|
18
18
|
let mainTsContent = 'console.log("Hello simple-data-analysis!");\n';
|
|
19
|
-
if (selectedPackages.includes("@nshiab/simple-data-analysis")
|
|
20
|
-
|
|
19
|
+
if (selectedPackages.includes("@nshiab/simple-data-analysis") ||
|
|
20
|
+
selectedPackages.includes("@nshiab/simple-data-analysis-core")) {
|
|
21
|
+
const pkg = selectedPackages.includes("@nshiab/simple-data-analysis")
|
|
22
|
+
? "@nshiab/simple-data-analysis"
|
|
23
|
+
: "@nshiab/simple-data-analysis-core";
|
|
24
|
+
mainTsContent = `import { SimpleDB } from "${pkg}";
|
|
21
25
|
|
|
22
26
|
const sdb = new SimpleDB();
|
|
23
27
|
const table = sdb.newTable();
|
|
@@ -18,8 +18,8 @@ export async function installPackagesAndFetchDocs(selectedPackages, options = {}
|
|
|
18
18
|
const installCmd = runtime === "deno"
|
|
19
19
|
? `deno add jsr:${pkg}`
|
|
20
20
|
: runtime === "bun"
|
|
21
|
-
? `
|
|
22
|
-
: `
|
|
21
|
+
? `bun add ${pkg}`
|
|
22
|
+
: `npm install ${pkg}`;
|
|
23
23
|
if (!options.silent) {
|
|
24
24
|
s.start(`Installing ${pkg} via ${runtime}...`);
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFolderStructure.d.ts","sourceRoot":"","sources":["../../src/helpers/createFolderStructure.ts"],"names":[],"mappings":"AAKA,wBAAsB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"createFolderStructure.d.ts","sourceRoot":"","sources":["../../src/helpers/createFolderStructure.ts"],"names":[],"mappings":"AAKA,wBAAsB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,mBA4CrE"}
|
|
@@ -19,8 +19,12 @@ async function createFolderStructure(selectedPackages) {
|
|
|
19
19
|
}
|
|
20
20
|
const mainTsPath = (0, node_path_1.join)(sdaFolder, "main.ts");
|
|
21
21
|
let mainTsContent = 'console.log("Hello simple-data-analysis!");\n';
|
|
22
|
-
if (selectedPackages.includes("@nshiab/simple-data-analysis")
|
|
23
|
-
|
|
22
|
+
if (selectedPackages.includes("@nshiab/simple-data-analysis") ||
|
|
23
|
+
selectedPackages.includes("@nshiab/simple-data-analysis-core")) {
|
|
24
|
+
const pkg = selectedPackages.includes("@nshiab/simple-data-analysis")
|
|
25
|
+
? "@nshiab/simple-data-analysis"
|
|
26
|
+
: "@nshiab/simple-data-analysis-core";
|
|
27
|
+
mainTsContent = `import { SimpleDB } from "${pkg}";
|
|
24
28
|
|
|
25
29
|
const sdb = new SimpleDB();
|
|
26
30
|
const table = sdb.newTable();
|
|
@@ -55,8 +55,8 @@ async function installPackagesAndFetchDocs(selectedPackages, options = {}) {
|
|
|
55
55
|
const installCmd = runtime === "deno"
|
|
56
56
|
? `deno add jsr:${pkg}`
|
|
57
57
|
: runtime === "bun"
|
|
58
|
-
? `
|
|
59
|
-
: `
|
|
58
|
+
? `bun add ${pkg}`
|
|
59
|
+
: `npm install ${pkg}`;
|
|
60
60
|
if (!options.silent) {
|
|
61
61
|
s.start(`Installing ${pkg} via ${runtime}...`);
|
|
62
62
|
}
|