Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'utf8'
);
const compiledTemplate = _.template(iconsTemplate);
const compiledIconsTemplate = compiledTemplate({ data: assetNameArr });
fs.outputFileSync(
path.join(__dirname, '../build/ios/Classes/Image.swift'),
compiledIconsTemplate
);
},
undo(dictionary, config) {
log(`Removing icons directory from ${config.buildPath} assets`);
fs.removeSync(config.buildPath);
},
});
StyleDictionary.registerAction({
name: 'copy_icons_android',
do(dictionary, config) {
log('Copying icons directory');
const assetsPath = path.join(__dirname, 'assets/icons/');
const assetPathArr = fs
.readdirSync(assetsPath)
.filter(asset => asset !== '.DS_Store')
.map(file => {
const assetPath = path.join(assetsPath, file);
const parsedPath = path.parse(assetPath);
return {
name: parsedPath.name,
path: assetPath,
};
});
// Processor of SVG before shipping