@driveflux/fab 2.1.1 → 2.2.0
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/bin/fab.js +2 -12
- package/package.json +9 -7
- package/tsconfig.json +25 -0
package/bin/fab.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
// @ts-check
|
|
3
2
|
import { Command, Option } from 'commander'
|
|
4
3
|
import path from 'node:path'
|
|
@@ -38,14 +37,9 @@ function makeBuildCommand() {
|
|
|
38
37
|
.option('-d, --dest <destination>', 'The destination path for the package, example: dist', 'dist')
|
|
39
38
|
.option('-s, --src <source>', 'The source path for the package, example: dist', 'src')
|
|
40
39
|
.option('-r, --reset', 'Clean up everything and build again')
|
|
41
|
-
.option(
|
|
42
|
-
'--exports <exports>',
|
|
43
|
-
'The exports definition as an alternative to package.json. It must be the same structure as "exports"',
|
|
44
|
-
parseExports
|
|
45
|
-
)
|
|
46
40
|
.addOption(
|
|
47
41
|
new Option('-t, --target [...target]', 'The target export to make')
|
|
48
|
-
.choices(['all', 'esm', 'types'
|
|
42
|
+
.choices(['all', 'esm', 'types'])
|
|
49
43
|
.default('all')
|
|
50
44
|
)
|
|
51
45
|
.action(async (options) => {
|
|
@@ -92,7 +86,7 @@ function makeCreateCommand() {
|
|
|
92
86
|
.argument('-n, --name <name>', 'The name of the package without @driveflux/')
|
|
93
87
|
.option('-d, --dest <destination>', 'The destination path for the package, example: packages, shared')
|
|
94
88
|
.option('--dangerouslyRewrite [dangerouslyRewrite]', 'Delete the destination path if it exists')
|
|
95
|
-
.action(async (name, { template, cwd: providedCwd,
|
|
89
|
+
.action(async (name, { template, cwd: providedCwd, dest, dangerouslyRewrite }) => {
|
|
96
90
|
if (!/^[a-z0-9-]+$/.test(name)) {
|
|
97
91
|
console.log('🚨 Only kebab-case names are allowed. Aborting.')
|
|
98
92
|
process.exit(1)
|
|
@@ -102,8 +96,4 @@ function makeCreateCommand() {
|
|
|
102
96
|
})
|
|
103
97
|
}
|
|
104
98
|
|
|
105
|
-
function parseExports(exports) {
|
|
106
|
-
return JSON.parse(exports)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
99
|
program.parse(process.argv)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/fab",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -9,23 +9,25 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"dist"
|
|
12
|
+
"dist",
|
|
13
|
+
"bin",
|
|
14
|
+
"tsconfig.json"
|
|
13
15
|
],
|
|
14
16
|
"dependencies": {
|
|
15
17
|
"@swc/cli": "^0.4.0",
|
|
16
|
-
"@swc/core": "1.7.
|
|
18
|
+
"@swc/core": "1.7.2",
|
|
17
19
|
"commander": "^12.1.0",
|
|
18
20
|
"del": "^7.1.0",
|
|
19
21
|
"lodash.merge": "^4.6.2",
|
|
20
22
|
"zod": "^3.23.8"
|
|
21
23
|
},
|
|
22
24
|
"devDependencies": {
|
|
23
|
-
"@driveflux/tsconfig": "1.
|
|
25
|
+
"@driveflux/tsconfig": "1.2.0",
|
|
24
26
|
"@types/lodash.merge": "^4.6.9",
|
|
25
|
-
"@types/node": "^20.14.
|
|
27
|
+
"@types/node": "^20.14.12",
|
|
26
28
|
"del-cli": "^5.1.0",
|
|
27
|
-
"type-fest": "^4.
|
|
28
|
-
"typescript": "^5.5.
|
|
29
|
+
"type-fest": "^4.23.0",
|
|
30
|
+
"typescript": "^5.5.4"
|
|
29
31
|
},
|
|
30
32
|
"bin": {
|
|
31
33
|
"fab": "./bin/fab.js"
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"moduleResolution": "NodeNext",
|
|
7
|
+
"lib": ["esnext"],
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"declarationMap": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"allowJs": false,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
"allowSyntheticDefaultImports": true,
|
|
18
|
+
"composite": true,
|
|
19
|
+
"incremental": true,
|
|
20
|
+
"rootDir": "src",
|
|
21
|
+
"outDir": "./dist"
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*.ts"],
|
|
24
|
+
"exclude": ["node_modules", "src/templates/**/*"]
|
|
25
|
+
}
|