@supersoniks/concorde 1.1.5 → 1.1.6

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 (3) hide show
  1. package/bin/cli.js +35 -0
  2. package/cli.js +0 -36
  3. package/package.json +2 -4
package/bin/cli.js ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execSync } = require('child_process');
4
+ const runCommand = command => {
5
+ try {
6
+ execSync(command, { stdio: "inherit" });
7
+ } catch (e) {
8
+ console.error(`Failed to execute ${command}`, e);
9
+ return false;
10
+ }
11
+ return true;
12
+ }
13
+ const repoName = process.argv[2];
14
+ const gitCheckoutCommand = `git clone --depth 1 https://github.com/ladigitale/concorde-ts-starter ${repoName}`;
15
+ const removeDotGitCommand = `rm -rf ${repoName}/.git`;
16
+ const installDepsCommand = `cd ${repoName} && yarn install`
17
+ const enableShortPathCmd = `cd ${repoName} && npx concorde enable-short-paths`;
18
+ console.log(`Cloning repository with name ${repoName}`);
19
+ const checkout = runCommand(gitCheckoutCommand)
20
+ if (!checkout) process.exit(-1);
21
+
22
+ const removeDotGit = runCommand(removeDotGitCommand);
23
+ if (!removeDotGit) process.exit(-1);
24
+
25
+ console.log(`installing dependencies for ${repoName}`);
26
+ const installDeps = runCommand(installDepsCommand);
27
+ if (!installDeps) process.exit(-1);
28
+
29
+ const enableShortPath = runCommand(enableShortPathCmd);
30
+ if (!enableShortPath) process.exit(-1);
31
+
32
+
33
+ console.log("Congratulations! You are ready. Follow the following commands to start");
34
+ console.log(`cd ${repoName} && yarn dev`);
35
+
package/cli.js CHANGED
@@ -58,41 +58,6 @@ function enableShortPaths() {
58
58
  }
59
59
  }
60
60
 
61
- function createConcordeTsApp() {
62
- const { execSync } = require('child_process');
63
- const runCommand = command => {
64
- try {
65
- execSync(command, { stdio: "inherit" });
66
- } catch (e) {
67
- console.error(`Failed to execute ${command}`, e);
68
- return false;
69
- }
70
- return true;
71
- }
72
- const repoName = process.argv[2];
73
- const gitCheckoutCommand = `git clone --depth 1 https://github.com/ladigitale/concorde-ts-starter ${repoName}`;
74
- const removeDotGitCommand = `rm -rf ${repoName}/.git`;
75
- const installDepsCommand = `cd ${repoName} && yarn install`
76
- const enableShortPathCmd = `cd ${repoName} && npx concorde enable-short-paths`;
77
- console.log(`Cloning repository with name ${repoName}`);
78
- const checkout = runCommand(gitCheckoutCommand)
79
- if (!checkout) process.exit(-1);
80
-
81
- const removeDotGit = runCommand(removeDotGitCommand);
82
- if (!removeDotGit) process.exit(-1);
83
-
84
- console.log(`installing dependencies for ${repoName}`);
85
- const installDeps = runCommand(installDepsCommand);
86
- if (!installDeps) process.exit(-1);
87
-
88
- const enableShortPath = runCommand(enableShortPathCmd);
89
- if (!enableShortPath) process.exit(-1);
90
-
91
-
92
- console.log("Congratulations! You are ready. Follow the following commands to start");
93
- console.log(`cd ${repoName} && yarn dev`);
94
-
95
- }
96
61
  switch (process.argv[2]) {
97
62
  case "enable-short-paths":
98
63
  enableShortPaths();
@@ -105,6 +70,5 @@ switch (process.argv[2]) {
105
70
  console.log("Usage: npx concorde <command>");
106
71
  console.log("Commands:");
107
72
  console.log(" enable-short-paths");
108
- console.log(" create-concorde-ts-app projectName");
109
73
  break;
110
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "customElements": "custom-elements.json",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -169,7 +169,5 @@
169
169
  "./utils/api": "./core/utils/api",
170
170
  "./index": "./index"
171
171
  },
172
- "bin": {
173
- "concorde": "./cli.js"
174
- }
172
+ "bin": "./bin/cli.js"
175
173
  }