Skip to content

Commit

Permalink
chore(converter): rename converter to single-file converter
Browse files Browse the repository at this point in the history
  • Loading branch information
nivekcode committed Mar 3, 2020
1 parent 391d955 commit 4b5e9e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/bin/svg-to-ts.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node
import * as packgeJSON from '../../package.json';
import commander from 'commander';
import { convert } from '../lib/convert';
import { Delimiter } from '../lib/generators/generators';
import { convertToSingleFile } from '../lib/converters/single-file.converter';

export interface ConvertionOptions {
delimiter: Delimiter;
Expand Down Expand Up @@ -61,4 +61,5 @@ const convertionOptions = {
srcFiles,
outputDirectory
};
convert(convertionOptions);

convertToSingleFile(convertionOptions);
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import chalk from 'chalk';
import * as path from 'path';
import { svgo } from './svgo';
import { svgo } from '../svgo';

import {
generateInterfaceDefinition,
generateSvgConstant,
generateTypeDefinition,
generateTypeName,
generateVariableName
} from './generators/generators';
import { getFilePathsFromRegex } from './regex-helpers';
import { extractSvgContent, writeIconsFile } from './file-helpers';
import { ConvertionOptions } from '../bin/svg-to-ts';
} from '../generators/generators';
import { getFilePathsFromRegex } from '../regex-helpers';
import { extractSvgContent, writeIconsFile } from '../file-helpers';
import { ConvertionOptions } from '../../bin/svg-to-ts';

const typesDelimitor = ' | ';

export const convert = async (convertionOptions: ConvertionOptions): Promise<void> => {
export const convertToSingleFile = async (convertionOptions: ConvertionOptions): Promise<void> => {
const { typeName, prefix, delimiter, interfaceName, outputDirectory, srcFiles } = convertionOptions;
let svgConstants = '';
let types = generateTypeDefinition(typeName);
Expand Down

0 comments on commit 4b5e9e5

Please sign in to comment.