Skip to content

Commit

Permalink
fix(repo): Build path issue resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
sullivanpj committed Nov 12, 2022
1 parent e735944 commit cdfb2ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConsoleLogger } from "@open-system/core-typescript-utilities";
import { readFileSync } from "fs";
import type { Config, DefaultPlugin, Output } from "svgo";
import { printError, printInfo } from "../../../helper-utilities";
import { DownloadableFile } from "../../types";
import { LibsType } from "../global-libs";
import {
Expand Down Expand Up @@ -89,16 +89,16 @@ export default async function (
{ SVGO, _ }: Pick<LibsType, "SVGO" | "_" | "SpServices">
): Promise<OutputDataType | Error> {
try {
printInfo("Running Svgo Parser");
ConsoleLogger.info("Running Svgo Parser");
options = options || {};
options.svgo = options?.svgo || {};
options.svgo.plugins = migrateSvgoPlugins(options.svgo.plugins);
printInfo(JSON.stringify(tokens, null, 2));
ConsoleLogger.info(JSON.stringify(tokens, null, 2));

return (await Promise.all(
tokens.map(async token => {
if (token.type === "vector" && token.value.format === "svg") {
printInfo(token.value.url);
ConsoleLogger.info(token.value.url);

const baseString = readFileSync(token.value.url, "utf8");

Expand All @@ -109,7 +109,7 @@ export default async function (
);
token.value.content = result.data!;
} catch (err) {
printError(err);
ConsoleLogger.error(err);

token.value.content = baseString;
}
Expand All @@ -120,7 +120,7 @@ export default async function (
})
)) as OutputDataType;
} catch (err) {
printError(err);
ConsoleLogger.error(err);

throw err;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ConsoleLogger } from "@open-system/core-typescript-utilities";
import deepmerge from 'deepmerge';
import * as _ from 'lodash';
import os from 'os';
import prettier from 'prettier';
import { printError } from '../../../helper-utilities';
import { IToken, PartialRecord, TokensType } from '../../types';
import { LibsType } from '../global-libs';
import { ColorsFormat, FormatName, TailwindTokenClass, TailwindType } from './to-tailwind.type';
Expand Down Expand Up @@ -117,7 +117,7 @@ export default async function (
const parserInstance = new ToTailwind(tokens, options);
return parserInstance.exec();
} catch (err) {
printError(err);
ConsoleLogger.error(err);
throw err;
}
}

0 comments on commit cdfb2ce

Please sign in to comment.