@joinbankroll/create-app 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5,11 +5,20 @@ import { spawnSync } from "child_process";
5
5
  import { existsSync, mkdirSync, readdirSync, rmSync, writeFileSync } from "fs";
6
6
  import { basename, resolve } from "path";
7
7
  import { createInterface } from "readline/promises";
8
+
9
+ // src/args.ts
8
10
  var TEMPLATE_REPO = "inplayinnovation/bankroll-starter";
9
11
  var DEFAULT_REF = "main";
10
12
  var DOWNLOAD_TIMEOUT_MS = 6e4;
11
13
  var ENV_FILE = ".env.local";
12
- var IGNORABLE = /* @__PURE__ */ new Set([".DS_Store", ".git", ".gitkeep", ".idea", ".vscode", "Thumbs.db"]);
14
+ var IGNORABLE = /* @__PURE__ */ new Set([
15
+ ".DS_Store",
16
+ ".git",
17
+ ".gitkeep",
18
+ ".idea",
19
+ ".vscode",
20
+ "Thumbs.db"
21
+ ]);
13
22
  function parse(argv) {
14
23
  const args = { ref: DEFAULT_REF, help: false };
15
24
  for (let i = 0; i < argv.length; i++) {
@@ -21,6 +30,8 @@ function parse(argv) {
21
30
  }
22
31
  return args;
23
32
  }
33
+
34
+ // src/index.ts
24
35
  function usage() {
25
36
  console.log(`
26
37
  Create a Built for Bankroll app.
@@ -120,17 +131,11 @@ async function main() {
120
131
  is not your app comes from @joinbankroll/sdk and updates with npm update.
121
132
  `);
122
133
  }
123
- if (process.argv[1] && import.meta.url.endsWith(basename(process.argv[1]))) {
124
- try {
125
- await main();
126
- } catch (error) {
127
- console.error(`
134
+ try {
135
+ await main();
136
+ } catch (error) {
137
+ console.error(`
128
138
  ${error instanceof Error ? error.message : String(error)}
129
139
  `);
130
- process.exit(1);
131
- }
140
+ process.exit(1);
132
141
  }
133
- export {
134
- IGNORABLE,
135
- parse
136
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joinbankroll/create-app",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Create a Built for Bankroll app",
5
5
  "license": "MIT",
6
6
  "repository": {