@quantform/create 0.7.0-beta.56 → 0.7.0-beta.57
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/package.json +1 -1
- package/src/index.ts +6 -6
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -12,7 +12,7 @@ const shell = promisify(exec);
|
|
|
12
12
|
program
|
|
13
13
|
.name('quantform')
|
|
14
14
|
.description('Setup the quantform project by running a single command.')
|
|
15
|
-
.
|
|
15
|
+
.option('<dir>', 'directory to initialize')
|
|
16
16
|
.action(async dir => {
|
|
17
17
|
await createDirectory(dir);
|
|
18
18
|
await addPackageJson();
|
|
@@ -23,9 +23,11 @@ program
|
|
|
23
23
|
})
|
|
24
24
|
.parse(process.argv);
|
|
25
25
|
|
|
26
|
-
async function createDirectory(dir
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
async function createDirectory(dir?: string) {
|
|
27
|
+
if (dir) {
|
|
28
|
+
mkdirSync(dir);
|
|
29
|
+
chdir(dir);
|
|
30
|
+
}
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
async function addPackageJson() {
|
|
@@ -45,8 +47,6 @@ async function addPackageJson() {
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
async function addTypescript() {
|
|
48
|
-
//await shell(`npm tsc --init`);
|
|
49
|
-
|
|
50
50
|
const config = editJsonFile(`./tsconfig.json`);
|
|
51
51
|
|
|
52
52
|
config.set('compilerOptions.module', 'commonjs');
|