@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 CHANGED
@@ -7,8 +7,10 @@ configurations, and documentation.
7
7
  # Deno
8
8
  deno run -A jsr:@nshiab/setup-data-project
9
9
 
10
+ # Node
10
11
  npx @nshiab/setup-data-project
11
12
 
13
+ # Bun
12
14
  bunx @nshiab/setup-data-project
13
15
  ```
14
16
 
@@ -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,mBAsCrE"}
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
- mainTsContent = `import { SimpleDB } from "@nshiab/simple-data-analysis";
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
- ? `bunx jsr add ${pkg}`
22
- : `npx jsr add ${pkg}`;
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nshiab/setup-data-project",
3
- "version": "1.0.18",
3
+ "version": "1.0.21",
4
4
  "description": "Quickly kick off your data project using the simple-data-analysis and journalism libraries.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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,mBAsCrE"}
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
- mainTsContent = `import { SimpleDB } from "@nshiab/simple-data-analysis";
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
- ? `bunx jsr add ${pkg}`
59
- : `npx jsr add ${pkg}`;
58
+ ? `bun add ${pkg}`
59
+ : `npm install ${pkg}`;
60
60
  if (!options.silent) {
61
61
  s.start(`Installing ${pkg} via ${runtime}...`);
62
62
  }