Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@icon-magic/distribute

Package Overview
Dependencies
Maintainers
5
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@icon-magic/distribute - npm Package Compare versions

Comparing version 2.5.0-beta.0 to 2.6.0-beta.0

dist/test/fixtures/input/animal-with-embedded-images/iconrc.json

5

dist/src/create-icon-template.d.ts

@@ -6,4 +6,5 @@ import { Asset } from '@icon-magic/icon-models';

* @param outputPath path to write to
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and
* "-with-image" suffix in file name when distributing to hbs.
*/
export declare function createHbs(assets: Asset[], outputPath: string, doNotRemoveSuffix: boolean): Promise<void>;
export declare function createHbs(assets: Asset[], outputPath: string, imageHrefHelper: string | undefined, pathToTheImageAsset: string | undefined, doNotRemoveSuffix: boolean): Promise<void>;

19

dist/src/create-icon-template.js

@@ -13,5 +13,6 @@ "use strict";

* @param outputPath path to write to
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and
* "-with-image" suffix in file name when distributing to hbs.
*/
async function createHbs(assets, outputPath, doNotRemoveSuffix) {
async function createHbs(assets, outputPath, imageHrefHelper, pathToTheImageAsset, doNotRemoveSuffix) {
for (const asset of assets) {

@@ -50,3 +51,12 @@ const doc = new xmldom_1.DOMParser();

}
},
else if (imageHrefHelper && node.tag === 'image') {
const imgHrefAttr = node.attributes.find(attr => attr.name === 'href');
node.attributes = node.attributes.filter(a => a !== imgHrefAttr);
if (imgHrefAttr) {
// replace the href to include the helper
const imageHrefValue = imgHrefAttr.value;
node.attributes.unshift(b.attr('href', b.mustache(b.path(imageHrefHelper), [b.string(pathToTheImageAsset ? path.join(pathToTheImageAsset, imageHrefValue.chars) : imageHrefValue.chars)], b.hash([]))));
}
}
}
};

@@ -58,2 +68,3 @@ }

iconName = iconName.replace(/-mixed$/, '');
iconName = iconName.replace(/-with-image/, '');
}

@@ -67,2 +78,2 @@ // create the output directory if it doesn't already exist

exports.createHbs = createHbs;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWljb24tdGVtcGxhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY3JlYXRlLWljb24tdGVtcGxhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsaUVBQWtEO0FBQ2xELCtCQUErQjtBQUMvQiw2QkFBNkI7QUFDN0IsbUNBQWtEO0FBRWxELE1BQU0saUJBQWlCLEdBQUcsSUFBSSxzQkFBYSxFQUFFLENBQUMsaUJBQWlCLENBQUM7QUFFaEU7Ozs7O0dBS0c7QUFDSSxLQUFLLFVBQVUsU0FBUyxDQUM3QixNQUFlLEVBQ2YsVUFBa0IsRUFDbEIsaUJBQTBCO0lBRTFCLEtBQUssTUFBTSxLQUFLLElBQUksTUFBTSxFQUFFO1FBQzFCLE1BQU0sR0FBRyxHQUFHLElBQUksa0JBQVMsRUFBRSxDQUFDO1FBQzVCLGlGQUFpRjtRQUNqRiwwQkFBMEI7UUFDMUIsTUFBTSxRQUFRLEdBQUcsTUFBTSxLQUFLLENBQUMsV0FBVyxFQUFFLENBQUM7UUFDM0MsK0NBQStDO1FBQy9DLE1BQU0sR0FBRyxHQUFHLEdBQUcsQ0FBQyxlQUFlLENBQUMsUUFBa0IsRUFBRSxlQUFlLENBQUMsQ0FBQztRQUNyRSxNQUFNLEVBQUUsR0FBRyxHQUFHLENBQUMsZUFBZSxDQUFDO1FBQy9CLE1BQU0sRUFBRSxHQUFHLEVBQUUsQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNyQyxJQUFJLFFBQVEsR0FBRyxFQUFFLENBQUM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13aXRoLWltYWdlLywgJycpO1xuICAgIH1cblxuICAgIC8vIGNyZWF0ZSB0aGUgb3V0cHV0IGRpcmVjdG9yeSBpZiBpdCBkb2Vzbid0IGFscmVhZHkgZXhpc3RcbiAgICBhd2FpdCBmcy5ta2RpcnAob3V0cHV0UGF0aCk7XG5cbiAgICAvLyB3cml0ZSB0aGUgbmV3IGhicyB0ZW1wbGF0ZSBmaWxlIHRvIGRpc2tcbiAgICBmcy53cml0ZUZpbGVTeW5jKHBhdGguam9pbihvdXRwdXRQYXRoLCBgJHtpY29uTmFtZX0uaGJzYCksIGNvZGUpO1xuICB9XG59XG5cbiJdfQ==

@@ -106,4 +106,5 @@ "use strict";

function isSupportedResolution(asset) {
// Pops the end of the asset name (after the "@"). Examples: "2" or "2-rtl".
let assetNameEnd = asset.name.split('@').pop();
LOGGER.debug(`Name: ${asset.name}, assetEnd1st: ${assetNameEnd}`);
// removes the "-rtl" suffix if it exists. Leaving only the number as a string.
if (assetNameEnd) {

@@ -117,2 +118,2 @@ assetNameEnd = assetNameEnd.replace(/-rtl$/, '');

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWltYWdlLXNldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUtaW1hZ2Utc2V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLCtDQUE0QztBQUM1QywrQkFBK0I7QUFDL0IsNkJBQTZCO0FBRTdCLG1DQUEyRTtBQUUzRSxNQUFNLE1BQU0sR0FBRyxJQUFJLGVBQU0sQ0FBQyx3Q0FBd0MsQ0FBQyxDQUFDO0FBQ3BFLE1BQU0seUJBQXlCLEdBQUcsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBZTVDOzs7Ozs7R0FNRztBQUNJLEtBQUssVUFBVSxjQUFjLENBQUMs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AnKS5wb3AoKTtcblxuICAvLyByZW1vdmVzIHRoZSBcIi1ydGxcIiBzdWZmaXggaWYgaXQgZXhpc3RzLiBMZWF2aW5nIG9ubHkgdGhlIG51bWJlciBhcyBhIHN0cmluZy5cbiAgaWYgKGFzc2V0TmFtZUVuZCkge1xuICAgIGFzc2V0TmFtZUVuZCA9IGFzc2V0TmFtZUVuZC5yZXBsYWNlKC8tcnRsJC8sICcnKTtcbiAgfVxuICBjb25zdCBhc3NldFJlc29sdXRpb24gPSBOdW1iZXIoYXNzZXROYW1lRW5kKTtcbiAgcmV0dXJuIGFzc2V0UmVzb2x1dGlvblxuICAgID8gSU9TX1NVUFBPUlRFRF9SRVNPTFVUSU9OUy5pbmNsdWRlcyhOdW1iZXIoYXNzZXRSZXNvbHV0aW9uKSlcbiAgICA6IHRydWU7XG59XG4iXX0=

@@ -8,5 +8,5 @@ import { IconSet } from '@icon-magic/icon-models';

* @param colorScheme array of strings matching the colorScheme attributes of the icon i.e: `light`, `dark`, `mixed`.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and "-with-image" suffixes in file name when distributing to hbs.
* @returns promise after completion
*/
export declare function distributeSvg(iconSet: IconSet, outputPath: string, groupByCategory: boolean, outputAsHbs: boolean, colorScheme: string[], doNotRemoveSuffix: boolean): Promise<void>;
export declare function distributeSvg(iconSet: IconSet, outputPath: string, groupByCategory: boolean, outputAsHbs: boolean, colorScheme: string[], withEmbeddedImage: boolean, doNotRemoveSuffix: boolean): Promise<void>;

@@ -17,6 +17,6 @@ "use strict";

* @param colorScheme array of strings matching the colorScheme attributes of the icon i.e: `light`, `dark`, `mixed`.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and "-with-image" suffixes in file name when distributing to hbs.
* @returns promise after completion
*/
async function distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, doNotRemoveSuffix) {
async function distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, withEmbeddedImage, doNotRemoveSuffix) {
// Sort icons so it looks pretty in .diff

@@ -35,3 +35,3 @@ const icons = sortIcons(iconSet.hash.values());

// Further filter the icons by matching the assets's colorScheme to the commander option --colorScheme
const assetsByColorScheme = assets.filter(asset => {
let assetsToDistribute = assets.filter(asset => {
if (asset.colorScheme) {

@@ -43,2 +43,8 @@ return colorScheme.includes(asset.colorScheme);

});
if (withEmbeddedImage) {
// filter down to only the assets that contain embedded images in them
assetsToDistribute = assetsToDistribute.filter(asset => {
return asset.name.match(/-with-image/) ? true : false;
});
}
const distributeConfig = icon.distribute;

@@ -52,4 +58,4 @@ const svgConfig = distributeConfig && distributeConfig.svg;

const { assetsToAddToSprite, assetsNoSprite } = variantsToFilter && variantsToFilter.length
? create_sprite_1.partitionAssetsForSprite(assetsByColorScheme, variantsToFilter)
: { assetsToAddToSprite: assetsByColorScheme, assetsNoSprite: assetsByColorScheme };
? create_sprite_1.partitionAssetsForSprite(assetsToDistribute, variantsToFilter)
: { assetsToAddToSprite: assetsToDistribute, assetsNoSprite: assetsToDistribute };
const iconHasSpriteConfig = !(distributeConfig &&

@@ -60,6 +66,8 @@ svgConfig &&

try {
const imageHrefHelper = svgConfig && svgConfig.outputAsHbs && svgConfig.outputAsHbs.imageHrefHelper;
const pathToTheImageAsset = svgConfig && svgConfig.outputAsHbs && svgConfig.outputAsHbs.pathToTheImageAsset;
const destPath = icon.category && groupByCategory
? path.join(outputPath, icon.category)
: outputPath;
await create_icon_template_1.createHbs(assetsByColorScheme, destPath, doNotRemoveSuffix);
await create_icon_template_1.createHbs(assetsToDistribute, destPath, imageHrefHelper, pathToTheImageAsset, doNotRemoveSuffix);
}

@@ -120,2 +128,2 @@ catch (e) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzdHJpYnV0ZS1zdmcuan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GgoKSxcbiAgICAgICAgcGF0aC5qb2luKG91dHB1dEljb25EaXIsIHBhdGguYmFzZW5hbWUoYXNzZXQuZ2V0UGF0aCgpKSlcbiAgICAgIClcbiAgICApO1xuICB9XG4gIHJldHVybiBQcm9taXNlLmFsbChwcm9taXNlcyk7XG59XG5cbi8qKlxuICogU29ydHMgYSBzZXQgb2YgaWNvbnMgYnkgcHJvcGVydHkgaWNvbk5hbWVcbiAqIEBwYXJhbSBpY29ucyBzZXQgb2YgaWNvbnMgdG8gc29ydFxuICogQHJldHVybnMgc29ydGVkIGFycmF5IG9mIGljb25zXG4gKi9cbmZ1bmN0aW9uIHNvcnRJY29ucyhpY29uczogSXRlcmFibGVJdGVyYXRvcjxJY29uPik6IEFycmF5PEljb24+IHtcbiAgcmV0dXJuIEFycmF5LmZyb20oaWNvbnMpLnNvcnQoKGljb25PbmU6IEljb24sIGljb25Ud286IEljb24pID0+IHtcbiAgICByZXR1cm4gY29tcGFyZVN0cmluZ3MoaWNvbk9uZS5pY29uTmFtZSwgaWNvblR3by5pY29uTmFtZSk7XG4gIH0pO1xufVxuIl19

@@ -10,6 +10,7 @@ import { IconConfigHash } from '@icon-magic/icon-models';

* @param colorScheme array of strings matching the colorScheme attributes of the icon ie: `light`, `dark`, `mixed`.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and
* "-with-image" suffixes in file name when distributing to hbs.
* @retuns promise after completion
*/
export declare function distributeByType(iconConfig: IconConfigHash, outputPath: string, type?: ICON_TYPES, groupByCategory?: boolean, outputAsHbs?: boolean, colorScheme?: string[], doNotRemoveSuffix?: boolean): Promise<void>;
export declare function distributeByType(iconConfig: IconConfigHash, outputPath: string, type?: ICON_TYPES, groupByCategory?: boolean, outputAsHbs?: boolean, colorScheme?: string[], withEmbeddedImage?: boolean, doNotRemoveSuffix?: boolean): Promise<void>;
export {};

@@ -17,6 +17,7 @@ "use strict";

* @param colorScheme array of strings matching the colorScheme attributes of the icon ie: `light`, `dark`, `mixed`.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and
* "-with-image" suffixes in file name when distributing to hbs.
* @retuns promise after completion
*/
async function distributeByType(iconConfig, outputPath, type = 'all', groupByCategory = true, outputAsHbs = false, colorScheme = ['light', 'dark'], doNotRemoveSuffix = false) {
async function distributeByType(iconConfig, outputPath, type = 'all', groupByCategory = true, outputAsHbs = false, colorScheme = ['light', 'dark'], withEmbeddedImage = false, doNotRemoveSuffix = false) {
LOGGER.debug(`entering distribute with ${type} and colorSchemes: ${colorScheme}`);

@@ -34,3 +35,3 @@ const iconSet = new icon_models_1.IconSet(iconConfig, true);

case 'svg': {
await distribute_svg_1.distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, doNotRemoveSuffix);
await distribute_svg_1.distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, withEmbeddedImage, doNotRemoveSuffix);
break;

@@ -41,3 +42,3 @@ }

await distribute_by_resolution_1.distributeByResolution(iconSet, outputPath);
await distribute_svg_1.distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, doNotRemoveSuffix);
await distribute_svg_1.distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, withEmbeddedImage, doNotRemoveSuffix);
}

@@ -47,2 +48,2 @@ }

exports.distributeByType = distributeByType;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseURBQWtFO0FBQ2xFLCtDQUE0QztBQUU1Qyx5REFBb0Q7QUFDcEQseUVBQW9FO0FBQ3BFLHFEQUFpRDtBQUVqRCxNQUFNLE1BQU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J1dGUgd2l0aCAke3R5cGV9IGFuZCBjb2xvclNjaGVtZXM6ICR7Y29sb3JTY2hlbWV9YCk7XG4gIGNvbnN0IGljb25TZXQgPSBuZXcgSWNvblNldChpY29uQ29uZmlnLCB0cnVlKTtcbiAgc3dpdGNoICh0eXBlKSB7XG4gICAgY2FzZSAncG5nJzoge1xuICAgICAgYXdhaXQgY3JlYXRlSW1hZ2VTZXQoaWNvblNldCwgb3V0cHV0UGF0aCk7XG4gICAgICBicmVhaztcbiAgICB9XG4gICAgY2FzZSAnd2VicCc6IHtcbiAgICAgIGF3YWl0IGRpc3RyaWJ1dGVCeVJlc29sdXRpb24oaWNvblNldCwgb3V0cHV0UGF0aCk7XG4gICAgICBicmVhaztcbiAgICB9XG4gICAgY2FzZSAnc3ZnJzoge1xuICAgICAgYXdhaXQgZGlzdHJpYnV0ZVN2ZyhpY29uU2V0LCBvdXRwdXRQYXRoLCBncm91cEJ5Q2F0ZWdvcnksIG91dHB1dEFzSGJzLCBjb2xvclNjaGVtZSwgd2l0aEVtYmVkZGVkSW1hZ2UsIGRvTm90UmVtb3ZlU3VmZml4KTtcbiAgICAgIGJyZWFrO1xuICAgIH1cbiAgICBkZWZhdWx0OiB7XG4gICAgICBhd2FpdCBjcmVhdGVJbWFnZVNldChpY29uU2V0LCBvdXRwdXRQYXRoKTtcbiAgICAgIGF3YWl0IGRpc3RyaWJ1dGVCeVJlc29sdXRpb24oaWNvblNldCwgb3V0cHV0UGF0aCk7XG4gICAgICBhd2FpdCBkaXN0cmlidXRlU3ZnKGljb25TZXQsIG91dHB1dFBhdGgsIGdyb3VwQnlDYXRlZ29yeSwgb3V0cHV0QXNIYnMsIGNvbG9yU2NoZW1lLCB3aXRoRW1iZWRkZWRJbWFnZSwgZG9Ob3RSZW1vdmVTdWZmaXgpO1xuICAgIH1cbiAgfVxufVxuIl19

@@ -15,2 +15,14 @@ "use strict";

describe('distribute works as expected', function () {
it('Moves all -with-image.svg files to the right output directory', async () => {
const iconSetAnimal = configReader.getIconConfigSet(new Array(path.resolve(FIXTURES, 'input/animal-with-embedded-images')));
await src_1.distributeByType(iconSetAnimal, output, 'svg', true, false, ['light', 'dark'], true);
try {
const files = fs.readdirSync(`${output}/its-ui-with-embedded-images/animal`);
assert.ok(files.includes('small.svg'));
assert.ok(files.includes('large.svg'));
}
catch (err) {
assert.ok(false, err);
}
});
it('Moves all .webp files to the right output directory', async () => {

@@ -407,2 +419,2 @@ await src_1.distributeByType(iconSet, output, 'webp', false);

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgtdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3Rlc3QvaW5kZXgtdGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBEQUEwRDtBQUMxRCxpQ0FBaUM7QUFDakMsZ0RBQWlEO0FBQ2pELCtCQUErQjtBQUMvQiw2QkFBNkI7QUFDN0IsbUNBQW1DO0FBRW5DLGdDQUEwQztBQUUxQyxNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLFNBQVMsRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLE1BQU0sRUFBRSxVQUFVLENBQUMsQ0FBQztBQUN6RSxNQUFNLEtBQUssR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLFFBQVEsRUFBRSxPQUFPLENBQUMsQ0FBQztBQUM5QyxNQUFNLE1BQU0sR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLFFBQVEsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUM3QyxNQUFNLE9BQU8sR0FBRyxZQUFZLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztBQUVoRSxRQUFRLENBQUMsOEJBQThCLEVBQUU7SUFDdkMsRUFBRSxDQUFDLHFEQUFxRCxFQUFFLEtBQ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ljb25OYW1lOiAnZmlsbGVkXzFfZmlsbGVkXzYweDYwJyxcbiAgICAgICAgY2F0ZWdvcnk6ICd1aS1pY29uJ1xuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgaWNvbk5hbWU6ICdhcnJvd19sZWZ0X21lZGl1bV8yNHgxMicsXG4gICAgICAgIGNhdGVnb3J5OiAndWktaWNvbidcbiAgICAgIH1cbiAgICBdO1xuICAgIGF3YWl0IGRpc3RyaWJ1dGVCeVR5cGUoaWNvblNldCwgb3V0cHV0LCAncG5nJywgZmFsc2UpO1xuXG4gICAgaWNvbnMuZm9yRWFjaChpY29uID0+IHtcbiAgICAgIHRyeSB7XG4gICAgICAgIGNvbnN0IGljb25QYXRoID0gYCR7b3V0cHV0fS8ke2ljb24uY2F0ZWdvcnl9LyR7aWNvbi5jYXRlZ29yeX1fJHtpY29uLmljb25OYW1lfS5pbWFnZXNldGA7XG4gICAgICAgIGlmIChmcy5leGlzdHNTeW5jKGljb25QYXRoKSkge1xuICAgICAgICAgIGFzc2VydC5vayhgJHtpY29uUGF0aH0gZGlyIHdhcyBnZW5lcmF0ZWRgKTtcbiAgICAgICAgICBjb25zdCBmaWxlcyA9IGZzLnJlYWRkaXJTeW5jKGljb25QYXRoKTtcbiAgICAgICAgICBhc3NlcnQub2soXG4gICAgICAgICAgICBmaWxlcy5pbmRleE9mKCdDb250ZW50cy5qc29uJykgPiAtMSxcbiAgICAgICAgICAgICdDb250ZW50cy5qc29uIHdhcyBnZW5lcmF0ZWQnXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIGNvbnN0IGNvbnRlbnRzSnNvbkltYWdlcyA9IGZzLnJlYWRKc29uU3luYyhwYXRoLmpvaW4oaWNvblBhdGgsICdDb250ZW50cy5qc29uJykpLmltYWdlcztcbiAgICAgICAgICBhc3NlcnQub2soQXJyYXkuaXNBcnJheShjb250ZW50c0pzb25JbWFnZXMpLCAnQ29udGVudHMuanNvbiBpcyBmaWxsZWQgd2l0aCBhbiBhcnJ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VHlwZShpY29uU2V0LCBvdXRwdXQsICdzdmcnLCB0cnVlKTtcbiAgICBjb25zdCBzcHJpdGVQYXRocyA9IFtcbiAgICAgIHtcbiAgICAgICAgcGF0aDogJ2ljb25zJyxcbiAgICAgICAgaWQ6ICdhLWhvbWUtZmlsbGVkLTEnLFxuICAgICAgICBjYXRlZ29yeTogJ3VpLWljb24nXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBwYXRoOiAnaWNvbnMnLFxuICAgICAgICBpZDogJ3BvaW50LWRlZmF1bHQnLFxuICAgICAgICBjYXRlZ29yeTogJ2FwcCdcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHBhdGg6ICdpY29ucycsXG4gICAgICAgIGlkOiAncG9pbnQtZGVmYXVsdC0yJyxcbiAgICAgICAgY2F0ZWdvcnk6ICdhcHAnXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBwYXRoOiAnaWNvbnMnLFxuICAgICAgICBpZDogJ2Fkcy1kZWZhdWx0JyxcbiAgICAgICAgY2F0ZWdvcnk6ICdhcHAnXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBwYXRoOiAnaWNvbnMnLFxuICAgICAgICBpZDogJ2Fkcy1kZWZhdWx0LTInLFxuICAgICAgICBjYXRlZ29yeTogJ2FwcCdcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHBhdGg6ICdpY29ucy0yJyxcbiAgICAgICAgaWQ6ICdiLWhvbWUtZmlsbGVkLTQnLFxuICAgICAgICBjYXRlZ29yeTogJ3VpLWljb24nXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBwYXRoOiAnaWNvbnMtMScsXG4gICAgICAgIGlkOiAnYy1ob21lLWZpbGxlZC04JyxcbiAgICAgICAgY2F0ZWdvcnk6ICd1aS1pY29uLTInXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBwYXRoOiAnaWNvbnMtMScsXG4gICAgICAgIGlkOiAnYy1ob21lLWZpbGxlZC04OC05JyxcbiAgICAgICA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ICAgICB9LFxuICAgICAge1xuICAgICAgICBwYXRoOiAnaWNvbnMnLFxuICAgICAgICBpZDogJ3BvaW50LWRlZmF1bHQtMicsXG4gICAgICAgIGNhdGVnb3J5OiAnYXBwJ1xuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcGF0aDogJ2ljb25zJyxcbiAgICAgICAgaWQ6ICdhZHMtZGVmYXVsdCcsXG4gICAgICAgIGNhdGVnb3J5OiAnYXBwJ1xuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcGF0aDogJ2ljb25zJyxcbiAgICAgICAgaWQ6ICdhZHMtZGVmYXVsdC0yJyxcbiAgICAgICAgY2F0ZWdvcnk6ICdhcHAnXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBwYXRoOiAnaWNvbnMtMicsXG4gICAgICAgIGlkOiAnYi1ob21lLWZpbGxlZC00JyxcbiAgICAgICAgY2F0ZWdvcnk6ICd1aS1pY29uJ1xuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcGF0aDogJ2ljb25zLTEnLFxuICAgICAgICBpZDogJ2MtaG9tZS1maWxsZWQtOCcsXG4gICAgICAgIGNhdGVnb3J5OiAndWktaWNvbi0yJ1xuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcGF0aDogJ2ljb25zLTEnLFxuICAgICAgICBpZDogJ2MtaG9tZS1maWxsZWQtODgtOScsXG4gICAgICAgIGNhdGVnb3J5OiAndWktaWNvbi0zJ1xuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcGF0aDogJ2ljb25zLTEnLFxuICAgICAgICBpZDogJ2MtaG9tZS1maWxsZWQtODg5JyxcbiAgICAgICAgY2F0ZWdvcnk6ICd1aS1pY29uLTInXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBwYXRoOiAnaWNvbnMtMicsXG4gICAgICAgIGlkOiAnaG9tZS1maWxsZWQtMicsXG4gICAgICAgIGNhdGVnb3J5OiAndWl4LWljb24nXG4gICAgICB9LFxuICAgICAge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CdhbmltYWwtbGFyZ2UnKSxcbiAgICAgICAgJ3Nob3VsZCBiZSBzb3J0ZWQgYWxwaGFiZXRpY2FsbHknXG4gICAgICApO1xuICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgYXNzZXJ0Lm9rKGZhbHNlLCBlcnIpO1xuICAgIH1cbiAgfSk7XG59KTtcbiJdfQ==
{
"name": "@icon-magic/distribute",
"version": "2.5.0-beta.0",
"version": "2.6.0-beta.0",
"description": "Icon magic distribute package.",

@@ -21,4 +21,4 @@ "main": "dist/src/index.js",

"dependencies": {
"@icon-magic/config-reader": "^2.5.0-beta.0",
"@icon-magic/icon-models": "^2.5.0-beta.0",
"@icon-magic/config-reader": "^2.4.0-beta.0",
"@icon-magic/icon-models": "^2.4.0-beta.0",
"@icon-magic/logger": "^2.3.0-beta.0",

@@ -25,0 +25,0 @@ "@types/xmldom": "^0.1.29",

import { Asset } from '@icon-magic/icon-models';
import { transform } from 'ember-template-recast';
import { AST, transform } from 'ember-template-recast';
import * as fs from 'fs-extra';

@@ -14,3 +14,4 @@ import * as path from 'path';

* @param outputPath path to write to
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and
* "-with-image" suffix in file name when distributing to hbs.
*/

@@ -20,2 +21,4 @@ export async function createHbs(

outputPath: string,
imageHrefHelper: string|undefined,
pathToTheImageAsset: string|undefined,
doNotRemoveSuffix: boolean

@@ -60,4 +63,13 @@ ): Promise<void> {

}
} else if (imageHrefHelper && node.tag === 'image') {
const imgHrefAttr = node.attributes.find(attr => attr.name === 'href');
node.attributes = node.attributes.filter(a => a !== imgHrefAttr);
if (imgHrefAttr) {
// replace the href to include the helper
const imageHrefValue = imgHrefAttr.value as AST.TextNode;
node.attributes.unshift(b.attr('href', b.mustache(b.path(imageHrefHelper), [b.string(pathToTheImageAsset ? path.join(pathToTheImageAsset, imageHrefValue.chars) : imageHrefValue.chars)], b.hash([]))));
}
}
},
}
};

@@ -70,2 +82,3 @@ }

iconName = iconName.replace(/-mixed$/, '');
iconName = iconName.replace(/-with-image/, '');
}

@@ -72,0 +85,0 @@

@@ -22,3 +22,3 @@ import { Asset, Icon, IconSet, SpriteConfig } from '@icon-magic/icon-models';

* @param colorScheme array of strings matching the colorScheme attributes of the icon i.e: `light`, `dark`, `mixed`.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and "-with-image" suffixes in file name when distributing to hbs.
* @returns promise after completion

@@ -32,2 +32,3 @@ */

colorScheme: string[],
withEmbeddedImage: boolean,
doNotRemoveSuffix: boolean

@@ -48,5 +49,4 @@ ): Promise<void> {

const assets = getIconFlavorsByType(icon, 'svg');
// Further filter the icons by matching the assets's colorScheme to the commander option --colorScheme
const assetsByColorScheme = assets.filter(asset => {
let assetsToDistribute = assets.filter(asset => {
if (asset.colorScheme) {

@@ -58,2 +58,8 @@ return colorScheme.includes(asset.colorScheme);

});
if (withEmbeddedImage) {
// filter down to only the assets that contain embedded images in them
assetsToDistribute = assetsToDistribute.filter(asset => {
return asset.name.match(/-with-image/) ? true : false;
});
}

@@ -71,4 +77,4 @@ const distributeConfig = icon.distribute;

variantsToFilter && variantsToFilter.length
? partitionAssetsForSprite(assetsByColorScheme, variantsToFilter)
: { assetsToAddToSprite: assetsByColorScheme, assetsNoSprite: assetsByColorScheme };
? partitionAssetsForSprite(assetsToDistribute, variantsToFilter)
: { assetsToAddToSprite: assetsToDistribute, assetsNoSprite: assetsToDistribute };

@@ -80,4 +86,7 @@ const iconHasSpriteConfig = !(

);
if (outputAsHbs) {
try {
const imageHrefHelper = svgConfig && svgConfig.outputAsHbs && svgConfig.outputAsHbs.imageHrefHelper;
const pathToTheImageAsset = svgConfig && svgConfig.outputAsHbs && svgConfig.outputAsHbs.pathToTheImageAsset;
const destPath =

@@ -87,3 +96,3 @@ icon.category && groupByCategory

: outputPath;
await createHbs(assetsByColorScheme, destPath, doNotRemoveSuffix);
await createHbs(assetsToDistribute, destPath, imageHrefHelper, pathToTheImageAsset, doNotRemoveSuffix);
}

@@ -121,2 +130,3 @@ catch(e) {

}
await Promise.all(promises).then(async () => {

@@ -123,0 +133,0 @@ // After we've gone through all the icons, write the sprites to a file

@@ -18,3 +18,4 @@ import { IconConfigHash, IconSet } from '@icon-magic/icon-models';

* @param colorScheme array of strings matching the colorScheme attributes of the icon ie: `light`, `dark`, `mixed`.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" suffix in file name when distributing to hbs.
* @param doNotRemoveSuffix boolean, when true will keep the "-mixed" and
* "-with-image" suffixes in file name when distributing to hbs.
* @retuns promise after completion

@@ -29,2 +30,3 @@ */

colorScheme: string[] = ['light', 'dark'],
withEmbeddedImage = false,
doNotRemoveSuffix = false

@@ -44,3 +46,3 @@ ): Promise<void> {

case 'svg': {
await distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, doNotRemoveSuffix);
await distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, withEmbeddedImage, doNotRemoveSuffix);
break;

@@ -51,5 +53,5 @@ }

await distributeByResolution(iconSet, outputPath);
await distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, doNotRemoveSuffix);
await distributeSvg(iconSet, outputPath, groupByCategory, outputAsHbs, colorScheme, withEmbeddedImage, doNotRemoveSuffix);
}
}
}

@@ -16,2 +16,14 @@ import * as configReader from '@icon-magic/config-reader';

describe('distribute works as expected', function () {
it('Moves all -with-image.svg files to the right output directory', async () => {
const iconSetAnimal = configReader.getIconConfigSet(new Array(path.resolve(FIXTURES, 'input/animal-with-embedded-images')));
await distributeByType(iconSetAnimal, output, 'svg', true, false, ['light', 'dark'], true);
try {
const files = fs.readdirSync(`${output}/its-ui-with-embedded-images/animal`);
assert.ok(files.includes('small.svg'));
assert.ok(files.includes('large.svg'));
} catch (err) {
assert.ok(false, err);
}
});
it('Moves all .webp files to the right output directory', async () => {

@@ -18,0 +30,0 @@ await distributeByType(iconSet, output, 'webp', false);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc