Configuration
The CLI searches for configuration using cosmiconfig in the current directory (process.cwd()), in this order:
dile.config.jsdile.config.cjsdile.config.mjsdile.config.jsonpackage.json
Base paths
You can configure the base output paths in two ways:
1) Recommended (object with basePath)
// dile.config.js
export default {
components: { basePath: 'src/components' },
resources: { basePath: 'src/resources' },
};
2) Short form (string)
// dile.config.js
export default {
components: 'src/components',
resources: 'src/resources',
};
In package.json
{
"dile": {
"components": { "basePath": "src/components" },
"resources": { "basePath": "src/resources" }
}
}
If there is no configuration, the default values are:
componentsBase = "src/components"resourcesBase = "src/resources"
Conventions and validations
- Path-type arguments
<path>accept subfolders using/(also normalizes\\→/). - Segments
.or..are not allowed in the path. - By default, if the file exists, the command fails with an error.
- With
--force, the existing file is overwritten.
dile CLI