Skip to content

Commit

Permalink
Fix dependency issue to vscode in preview script
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed Apr 1, 2020
1 parent 1034fd4 commit 9831f58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/scripts/helpers/titleCase.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** TitleCase all words in a string */
export const toTitleCase = (str: string): string => {
return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
};
2 changes: 1 addition & 1 deletion src/scripts/preview/preview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';
import { toTitleCase } from '../../helpers';
import { toTitleCase } from './../helpers/titleCase';
import { createScreenshot } from '../helpers/screenshots';
import * as painter from './../helpers/painter';

Expand Down

0 comments on commit 9831f58

Please sign in to comment.