to-bitmap-file
This parser helps you generate PNG and JPG files from your bitmap assets.
Interface
interface parser {
name: 'to-bitmap-file';
options: {
filenameTemplate: string;
};
output: {
type: 'directory';
directoryPath: string;
};
};Options
Parameter
Required
Type
Default
Description
Basic usage - single mode
{
"assets": {
"image": {
"$type": "bitmap",
"$value": {
"1x": {
"url": "<url-of-your-bitmap-file>",
"format": "png",
"width": 623,
"height": 415,
"variationLabel": null
}
}
}
}
}{
"version": "2",
"repository": "@organization/repository",
// Only use the personalAccessToken when working with the CLI
"personalAccessToken": "<your-personal-access-token>",
"rules": [
{
"name": "Generate images",
"parsers": [
{
"name": "to-bitmap-file",
"output": {
"type": "directory",
"directoryPath": "public"
}
}
]
}
]
}Advanced usage - Several modes by definition (@1x, @2x...)
Last updated
Was this helpful?