GlobIgnoreStrategy
Ignores file paths based on simple glob patterns.
Initializers
import { GlobIgnoreStrategy } from '@alicloud/ros-cdk-core'
new GlobIgnoreStrategy(absoluteRootPath: string, patterns: string[])
| Name | Type | Description |
|---|---|---|
absoluteRootPath |
string |
No description. |
patterns |
string[] |
No description. |
absoluteRootPathRequired
- Type: string
patternsRequired
- Type: string[]
Methods
| Name | Description |
|---|---|
add |
Adds another pattern. |
ignores |
Determines whether a given file path should be ignored or not. |
add
public add(pattern: string): void
Adds another pattern.
- Type: string
ignores
public ignores(absoluteFilePath: string): boolean
Determines whether a given file path should be ignored or not.
- Type: string
absolute file path to be assessed against the pattern.
Static Functions
| Name | Description |
|---|---|
docker |
Ignores file paths based on the .dockerignore specification. |
fromCopyOptions |
Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions. |
git |
Ignores file paths based on the .gitignore specification. |
glob |
Ignores file paths based on simple glob patterns. |
docker
import { GlobIgnoreStrategy } from '@alicloud/ros-cdk-core'
GlobIgnoreStrategy.docker(absoluteRootPath: string, patterns: string[])
Ignores file paths based on the .dockerignore specification.
- Type: string
the absolute path to the root directory of the paths to be considered.
- Type: string[]
fromCopyOptions
import { GlobIgnoreStrategy } from '@alicloud/ros-cdk-core'
GlobIgnoreStrategy.fromCopyOptions(options: CopyOptions, absoluteRootPath: string)
Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions.
- Type: CopyOptions
the CopyOptions to create the IgnoreStrategy from.
- Type: string
the absolute path to the root directory of the paths to be considered.
git
import { GlobIgnoreStrategy } from '@alicloud/ros-cdk-core'
GlobIgnoreStrategy.git(absoluteRootPath: string, patterns: string[])
Ignores file paths based on the .gitignore specification.
- Type: string
the absolute path to the root directory of the paths to be considered.
- Type: string[]
glob
import { GlobIgnoreStrategy } from '@alicloud/ros-cdk-core'
GlobIgnoreStrategy.glob(absoluteRootPath: string, patterns: string[])
Ignores file paths based on simple glob patterns.
- Type: string
the absolute path to the root directory of the paths to be considered.
- Type: string[]