create-loom 0.0.3 → 0.0.5
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/dist/index.js
CHANGED
|
@@ -42,8 +42,13 @@ const tsConfigSource = (await readFile(`${path}/tsconfig.json`, {
|
|
|
42
42
|
encoding: 'utf-8',
|
|
43
43
|
}))
|
|
44
44
|
// Clean up some comments that will be irrelevant after config manipulation:
|
|
45
|
-
.replace(
|
|
46
|
-
.replace(
|
|
45
|
+
.replace(/\s*\/\/ File Layout\n/i, '')
|
|
46
|
+
.replace(/\s*\/\/ "rootDir": ".*",\n/, '')
|
|
47
|
+
.replace(/\s*\/\/ "outDir": ".*",\n/, '')
|
|
48
|
+
.replace(/\s*\/\/ For nodejs:\n/i, '')
|
|
49
|
+
.replace(/\s*\/\/ "lib": \[.*\],\n/, '')
|
|
50
|
+
.replace(/\s*\/\/ "types": \[.*\],\n/, '')
|
|
51
|
+
.replace(/\s*\/\/ .*npm install -D @types\/node\b/, '');
|
|
47
52
|
const tsConfig = JSONC.parse(tsConfigSource);
|
|
48
53
|
if (typeof tsConfig !== 'object' ||
|
|
49
54
|
tsConfig === null ||
|
|
@@ -64,7 +69,18 @@ assignableCompilerOptions.jsx = 'react';
|
|
|
64
69
|
assignableCompilerOptions.jsxFactory = 'createElement';
|
|
65
70
|
assignableCompilerOptions.jsxFragmentFactory = 'createElement';
|
|
66
71
|
assignableCompilerOptions.types = ['node'];
|
|
72
|
+
assignableCompilerOptions.rootDir = 'src';
|
|
67
73
|
assignableCompilerOptions.outDir = 'dist';
|
|
74
|
+
assignableCompilerOptions[Symbol.for('before:jsx')] = [
|
|
75
|
+
{ type: 'BlankLine', inline: false },
|
|
76
|
+
{
|
|
77
|
+
type: 'LineComment',
|
|
78
|
+
value: ' Options for Loom',
|
|
79
|
+
inline: false,
|
|
80
|
+
// This metadata doesn't actually matter when inserting a comment:
|
|
81
|
+
loc: { start: { line: NaN, column: NaN }, end: { line: NaN, column: NaN } },
|
|
82
|
+
},
|
|
83
|
+
];
|
|
68
84
|
const updatedTSConfigSource = JSONC.stringify(tsConfig, null, 2);
|
|
69
85
|
await writeFile(`${path}/tsconfig.json`, updatedTSConfigSource);
|
|
70
86
|
/**
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-loom",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"bin":
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"bin": {
|
|
5
|
+
"create-loom": "dist/index.js"
|
|
6
|
+
},
|
|
5
7
|
"devDependencies": {
|
|
6
8
|
"@types/node": "^24.8.1",
|
|
7
|
-
"typescript": "^
|
|
9
|
+
"typescript": "^6.0.2"
|
|
8
10
|
},
|
|
9
11
|
"files": [
|
|
10
12
|
"dist/*",
|
|
@@ -12,7 +14,10 @@
|
|
|
12
14
|
],
|
|
13
15
|
"license": "MIT",
|
|
14
16
|
"main": "dist/index.js",
|
|
15
|
-
"repository":
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/mkantor/create-loom.git"
|
|
20
|
+
},
|
|
16
21
|
"scripts": {
|
|
17
22
|
"build": "tsc --build tsconfig.main.json",
|
|
18
23
|
"build:tests": "tsc --project tsconfig.main.json --outDir dist-test --declarationDir dist && tsc --build tsconfig.test.json",
|
|
@@ -22,6 +27,6 @@
|
|
|
22
27
|
},
|
|
23
28
|
"type": "module",
|
|
24
29
|
"dependencies": {
|
|
25
|
-
"comment-json": "^
|
|
30
|
+
"comment-json": "^5.0.0"
|
|
26
31
|
}
|
|
27
32
|
}
|
|
File without changes
|