@driveflux/fab 1.0.0-next.0 → 1.0.0-next.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.
- package/.turbo/turbo-build.log +14 -13
- package/CHANGELOG.md +6 -0
- package/bin/fab.js +7 -6
- package/dist/build.js +2 -0
- package/dist/src/build.js +737 -0
- package/dist/src/clean.js +258 -0
- package/dist/src/config.js +279 -0
- package/dist/src/create.js +270 -0
- package/dist/src/index.js +5 -0
- package/dist/src/types.js +1 -0
- package/dist/src/utils.js +308 -0
- package/package.json +9 -9
- package/src/build.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
>
|
|
13
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @driveflux/fab@1.0.0-next.1 build /Users/flux/Projects/flux/packages/fab
|
|
4
|
+
> pnpm build:js && pnpm build:types
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
> @driveflux/fab@1.0.0-next.1 build:js /Users/flux/Projects/flux/packages/fab
|
|
8
|
+
> swc src --strip-leading-paths -d dist
|
|
9
|
+
|
|
10
|
+
Successfully compiled: 7 files with swc (341.42ms)
|
|
11
|
+
|
|
12
|
+
> @driveflux/fab@1.0.0-next.1 build:types /Users/flux/Projects/flux/packages/fab
|
|
13
|
+
> tsc --build --emitDeclarationOnly
|
|
14
|
+
|
package/CHANGELOG.md
CHANGED
package/bin/fab.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// @ts-check
|
|
3
|
-
import {
|
|
3
|
+
import { Command, Option } from 'commander'
|
|
4
4
|
import path from 'node:path'
|
|
5
5
|
import { build, buildCjs, buildEsm, buildTypes, clean, create, makeBaseExports, parseConfig } from '../index.js'
|
|
6
6
|
const program = new Command()
|
|
@@ -37,12 +37,13 @@ function makeBuildCommand() {
|
|
|
37
37
|
'The exports definition as an alternative to package.json. It must be the same structure as "exports"',
|
|
38
38
|
parseExports
|
|
39
39
|
)
|
|
40
|
-
.
|
|
41
|
-
new
|
|
40
|
+
.addOption(
|
|
41
|
+
new Option('-t, --target [...target]', 'The target export to make')
|
|
42
42
|
.choices(['all', 'esm', 'cjs', 'types', 'clean', 'cjs-exports'])
|
|
43
43
|
.default('all')
|
|
44
44
|
)
|
|
45
|
-
.action(async (
|
|
45
|
+
.action(async (options) => {
|
|
46
|
+
const { target } = options
|
|
46
47
|
const cwd = path.resolve(process.cwd(), options.cwd)
|
|
47
48
|
const config = await parseConfig({ cwd })
|
|
48
49
|
|
|
@@ -56,7 +57,7 @@ function makeBuildCommand() {
|
|
|
56
57
|
...config,
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
switch (
|
|
60
|
+
switch (target) {
|
|
60
61
|
case 'all':
|
|
61
62
|
await build(finalOptions)
|
|
62
63
|
break
|
|
@@ -73,7 +74,7 @@ function makeBuildCommand() {
|
|
|
73
74
|
await buildTypes(finalOptions)
|
|
74
75
|
break
|
|
75
76
|
default:
|
|
76
|
-
throw new Error(`Unknown
|
|
77
|
+
throw new Error(`Unknown target ${target}`)
|
|
77
78
|
}
|
|
78
79
|
})
|
|
79
80
|
}
|
package/dist/build.js
CHANGED
|
@@ -289,6 +289,7 @@ export var buildCjs = function() {
|
|
|
289
289
|
runCommand("pnpm", [
|
|
290
290
|
"swc",
|
|
291
291
|
"src",
|
|
292
|
+
"--strip-leading-paths",
|
|
292
293
|
"-C",
|
|
293
294
|
"module.type=commonjs",
|
|
294
295
|
"-d",
|
|
@@ -688,6 +689,7 @@ export var buildEsm = function() {
|
|
|
688
689
|
runCommand("pnpm", [
|
|
689
690
|
"swc",
|
|
690
691
|
"src",
|
|
692
|
+
"--strip-leading-paths",
|
|
691
693
|
"-d",
|
|
692
694
|
(_options_destination = options.destination) !== null && _options_destination !== void 0 ? _options_destination : getDefaultOptions().destination
|
|
693
695
|
], {
|