Constructor
new FileMappingRule(args)
- Source:
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Array.<object> | object | the Translation files mapping rules object represented by Properties
|
Methods
getPath(type, params)
- Source:
Obtain the file path
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type |
string | the project type |
||||||||||||||||||||||||
params |
object |
Properties
|
Throws:
-
Unknown mapping type
- Type
- Error
getRealPath(type, params)
- Source:
Obtain the absolute file path
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type |
string | the project type |
||||||||||||||||||||||||
params |
object |
Properties
|
Throws:
-
Unknown mapping type
- Type
- Error
setMapping(type, pattern)
- Source:
Set the mapping rule
Parameters:
Name | Type | Description |
---|---|---|
type |
string | the project type |
pattern |
string | the file name pattern |