42 lines
1.6 KiB
JavaScript
42 lines
1.6 KiB
JavaScript
module.exports = {
|
|
inputDir: './src/shared/assets/icons/formatting', // (required)
|
|
outputDir: './public/fonts/icons', // (required)
|
|
fontTypes: ['woff', 'woff2'],
|
|
assetTypes: ['ts', 'css'],
|
|
fontsUrl: '/fonts/icons',
|
|
normalize: true,
|
|
formatOptions: {
|
|
json: {
|
|
// render the JSON human readable with two spaces indentation (default is none, so minified)
|
|
indent: 2,
|
|
},
|
|
ts: {
|
|
// select what kind of types you want to generate (default `['enum', 'constant', 'literalId', 'literalKey']`)
|
|
types: ['literalId'],
|
|
// render the types with `'` instead of `"` (default is `"`)
|
|
singleQuotes: true,
|
|
// customise names used for the generated types and constants
|
|
// enumName: 'MyIconType',
|
|
// constantName: 'IconsCodes',
|
|
literalIdName: 'IconNames',
|
|
// literalKeyName: 'IconKey',
|
|
},
|
|
},
|
|
// Use a custom Handlebars template
|
|
templates: {
|
|
// css: './my-custom-tp.css.hbs',
|
|
},
|
|
pathOptions: {
|
|
ts: './src/shared/lib/types/icons.ts',
|
|
// json: './misc/icon-codepoints.json',
|
|
css: './src/app/styles/utils/icons.scss',
|
|
},
|
|
// getIconId: ({
|
|
// basename, // `string` - Example: 'foo';
|
|
// relativeDirPath, // `string` - Example: 'sub/dir/foo.svg'
|
|
// absoluteFilePath, // `string` - Example: '/var/icons/sub/dir/foo.svg'
|
|
// relativeFilePath, // `string` - Example: 'foo.svg'
|
|
// index, // `number` - Example: `0`
|
|
// }) => [index, basename].join('_'), // '0_foo'
|
|
}
|