IgnoreStrategy
Represents file path ignoring behavior.
Initializers
import { IgnoreStrategy } from '@alicloud/ros-cdk-core'
new IgnoreStrategy()
| Name | Type | Description |
|---|---|---|
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 { IgnoreStrategy } from '@alicloud/ros-cdk-core'
IgnoreStrategy.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 { IgnoreStrategy } from '@alicloud/ros-cdk-core'
IgnoreStrategy.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 { IgnoreStrategy } from '@alicloud/ros-cdk-core'
IgnoreStrategy.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 { IgnoreStrategy } from '@alicloud/ros-cdk-core'
IgnoreStrategy.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[]