commons:glob-parse
This commit is contained in:
parent
0adbd5757a
commit
a8ee605ba0
7
packages/commons/dist/fs/_glob.js
vendored
7
packages/commons/dist/fs/_glob.js
vendored
File diff suppressed because one or more lines are too long
@ -11,6 +11,7 @@ import { isFile, isFolder } from '../fs.js'
|
||||
import { PATH_INFO } from '../types_common.js'
|
||||
|
||||
import { globBase } from './glob-base.js'
|
||||
import { parseGlob } from './glob-parse.js'
|
||||
export { globBase } from './glob-base.js'
|
||||
export { globParent } from './glob-parent.js'
|
||||
|
||||
@ -21,7 +22,7 @@ export const getExtensions = (glob: string) => {
|
||||
if (match) {
|
||||
return glob.substring((match.index || 0) + 2, glob.lastIndexOf(')')).split('|')
|
||||
} else {
|
||||
// return [parseGlob(glob).path.ext]
|
||||
return [parseGlob(glob).path.ext]
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,7 +91,7 @@ export const pathInfo = (src: string, altToken: boolean = false, cwd: string = n
|
||||
variables.DIR = path.resolve(glob_base.base)
|
||||
variables.FILE_NAME = glob_base.glob
|
||||
variables.GLOB = glob_base.glob
|
||||
//variables.GLOB_EXTENSIONS = getExtensions(glob_base.glob)
|
||||
variables.GLOB_EXTENSIONS = getExtensions(glob_base.glob)
|
||||
variables.FILES = globSync(glob_base.glob, {
|
||||
dot: true,
|
||||
cwd: path.resolve(cwd || variables.DIR),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user