1.1.2 • Published 7 years ago
hoast-transform v1.1.2
hoast-transform
Transform the content of files based on the extension.
As the name suggest this is a hoast module. The module has been based of metalsmith-in-place.
Usage
Install hoast-transform using npm.
$ npm install hoast-transformParameters
options: Options given to the JSTransformer.- Type:
Object* Default:{}
- Type:
patterns: Glob patterns to match file paths with. If the engine function is set it will only give the function any files matching the pattern.- Type:
StringorArray of strings* Required:no
- Type:
patternOptions: Options for the glob pattern matching. See planckmatch options for more details on the pattern options.- Type:
Object - Default:
{}
- Type:
patternOptions.all: This options is added topatternOptions, and determines whether all patterns need to match instead of only one.- Type:
Boolean - Default:
false
- Type:
Example
CLI
{
"modules": {
"read": {},
"hoast-transform": {
"patterns": "*.md"
}
}
}Script
const Hoast = require(`hoast`);
const read = Hoast.read,
transform = require(`hoast-transform`);
Hoast(__dirname)
.use(read())
.use(transform({
patterns: `*.md`
}))
.process();In the examples the markdown files will be transformed to HTML.
Troubleshooting
If you are having problems with the module please enable debugging to have a closer look.
File not valid for processing.
- The file is not utf-8 encoded.
- The file path does not match any of the patterns.
No valid transformer found for extension .
- Check if the JSTransformer associated with the extension is installed.
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
1.0.0-beta.2
7 years ago
1.0.0-beta.1
7 years ago
1.0.0-beta.0
7 years ago
0.1.0
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago
0.0.0
7 years ago