phio 0.1.0 → 0.1.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/package.json +1 -1
- package/src/commands/DevCommand.ts +20 -6
package/package.json
CHANGED
|
@@ -39,13 +39,20 @@ export const DevCommand = () => {
|
|
|
39
39
|
'-i, --include <include...>',
|
|
40
40
|
'Files to include in the sync',
|
|
41
41
|
(val, prev) => [...prev, val],
|
|
42
|
-
[
|
|
42
|
+
[
|
|
43
|
+
`pb_*`,
|
|
44
|
+
'pb_*/**/*',
|
|
45
|
+
`package.json`,
|
|
46
|
+
`bun.lockb`,
|
|
47
|
+
`patches`,
|
|
48
|
+
`patches/**/*`,
|
|
49
|
+
]
|
|
43
50
|
)
|
|
44
51
|
.option(
|
|
45
52
|
'-e, --exclude <exclude...>',
|
|
46
53
|
'Files to exclude from the sync',
|
|
47
54
|
(val, prev) => [...prev, val],
|
|
48
|
-
[`pb_data/**/*`]
|
|
55
|
+
[`pb_data`, `pb_data/**/*`]
|
|
49
56
|
)
|
|
50
57
|
.action(async (_instanceId, { include, exclude }) => {
|
|
51
58
|
if (!_instanceId) {
|
|
@@ -74,10 +81,17 @@ export const DevCommand = () => {
|
|
|
74
81
|
persistent: true,
|
|
75
82
|
ignored: (file) => {
|
|
76
83
|
if (file === '.') return false
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
console.log({
|
|
84
|
+
const isIncluded = multimatch([file], include).length > 0
|
|
85
|
+
const isExcluded = multimatch([file], exclude).length > 0
|
|
86
|
+
const isIgnored = !isIncluded || isExcluded
|
|
87
|
+
console.log({
|
|
88
|
+
file,
|
|
89
|
+
include,
|
|
90
|
+
isIncluded,
|
|
91
|
+
exclude,
|
|
92
|
+
isExcluded,
|
|
93
|
+
isIgnored,
|
|
94
|
+
})
|
|
81
95
|
return isIgnored
|
|
82
96
|
},
|
|
83
97
|
})
|