Skip to content

Commit

Permalink
Switch build system to tsdx (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuykendall authored Sep 9, 2020
1 parent b6acf19 commit 411f761
Show file tree
Hide file tree
Showing 36 changed files with 3,940 additions and 82,149 deletions.
14 changes: 0 additions & 14 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# User Interface distribution / packaging
**/node_modules/
coverage

# Other
_book
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- "10"
- "8"
- "node"
- "lts/*"
cache:
directories:
- "node_modules"
Expand All @@ -18,7 +18,7 @@ jobs:
script: yarn lint
- stage: Produce Coverage
node_js: 10
script: jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
script: yarn test --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage

branches:
only:
Expand Down
22 changes: 11 additions & 11 deletions dist/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Decimal from 'decimal.js';
export declare const EMPTY_FIELD = "--";
export declare const DATE_FORMATS: {
date: string;
date_at_time: string;
date_value: string;
};
export declare const CENT_DECIMAL: Decimal;
export declare const RE_ALPHA: RegExp;
export declare const RE_WORDS: RegExp;
export declare const RE_SMALL_WORDS: RegExp;
import Decimal from 'decimal.js';
export declare const EMPTY_FIELD = "--";
export declare const DATE_FORMATS: {
date: string;
date_at_time: string;
date_value: string;
};
export declare const CENT_DECIMAL: Decimal;
export declare const RE_ALPHA: RegExp;
export declare const RE_WORDS: RegExp;
export declare const RE_SMALL_WORDS: RegExp;
22 changes: 11 additions & 11 deletions dist/containers.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
export interface IDisabledContainerProps {
className?: any;
}
export interface IGuardedContainerProps {
disabledComponent: React.ReactNode;
enabledComponent: React.ReactNode;
isGuarded: boolean;
}
export declare function createDisabledContainer(WrappedComponent: React.ComponentType<any>): React.ReactNode;
export declare function createGuardedContainer({ isGuarded, enabledComponent, disabledComponent }: IGuardedContainerProps): React.ComponentClass;
import React from 'react';
export interface IDisabledContainerProps {
className?: any;
}
export interface IGuardedContainerProps {
disabledComponent: React.ReactNode;
enabledComponent: React.ReactNode;
isGuarded: boolean;
}
export declare function createDisabledContainer(WrappedComponent: React.ComponentClass<any>): React.ComponentClass;
export declare function createGuardedContainer({ isGuarded, enabledComponent, disabledComponent, }: IGuardedContainerProps): React.ComponentClass;
6 changes: 3 additions & 3 deletions dist/date.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export declare function dateToday(): string;
export declare function isFutureDate(date: string): boolean;
export declare function inferCentury(year: string): string;
export declare function dateToday(): string;
export declare function isFutureDate(date: string): boolean;
export declare function inferCentury(year: string): string;
89 changes: 44 additions & 45 deletions dist/formatting.d.ts
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
/// <reference types="react" />
import { IAddress } from './interfaces';
export declare function canReplaceSymbols(template: string, chars: string[]): boolean;
export declare function replaceSymbolsWithChars(template: string, chars: string[]): string;
export declare function hasStringContent(value: unknown): value is string;
export declare function hasStringOrNumberContent(value: unknown): value is number | string;
export declare function splitName(name?: string | null): string[];
export declare function splitCommaList(str?: string | null): string[];
export declare function formatFullName(firstName?: string, lastName?: string): string;
export declare function formatNumberTemplates(value: undefined | string | null, templates: string[]): string;
export declare function formatPhoneNumber(value?: string | null): string;
export declare function formatDate(value?: string | null, dateFormat?: string): string;
export declare function formatDateTime(value?: string | null): string;
export declare function getNameOrDefault(obj?: unknown, { field, defaultValue }?: {
field?: string | undefined;
defaultValue?: string | undefined;
}): any;
export declare function getOrDefault(value?: any): any;
export declare function formatSocialSecurityNumber(value?: null | string): string;
export declare function formatEmployerIdNumber(value?: null | string): string;
export declare function formatPercentage(value?: null | number | string, decimalPoints?: number): string;
export declare function formatMoney(value?: null | number | string): string;
export declare function formatDollars(value?: null | number | string): string;
export declare function formatParagraphs(value?: null | string): "--" | JSX.Element[];
export declare function formatCommaSeparatedNumber(value?: null | number | string): string;
export declare function formatDelimitedList(list?: null | string[], delimiter?: string): any;
export declare function mapBooleanToText(bool?: boolean | null, { mapUndefinedToNo }?: {
mapUndefinedToNo: boolean;
}): "--" | "Yes" | "No";
export declare function formatMoneyInput(value?: null | number | string): number | null | undefined;
export declare function formatDuration(iso8601?: null | string): string;
export declare function formatWebsite(website?: string | null, text?: string): (string | JSX.Element);
export declare function stripNonAlpha(str?: string | null): string;
export declare function pluralize(baseWord: string, pluralSuffix: string, count: number): string;
export declare function getType(fullType?: null | string): string | null | undefined;
export declare function preserveNewLines(body: string): string;
export declare function parseAndPreserveNewlines(body?: string): any;
export declare function getDisplayName(component: any): (string | undefined);
export declare const varToLabel: (str: string) => string;
export declare function getInitials(value?: string | null): string;
export declare function toKey(dict: {
[key: string]: any;
}): string;
export declare function formatAddress(address?: IAddress | null): string;
export declare function formatAddressMultiline(address?: IAddress | null): any;
import { IAddress } from './interfaces';
export declare function canReplaceSymbols(template: string, chars: string[]): boolean;
export declare function replaceSymbolsWithChars(template: string, chars: string[]): string;
export declare function hasStringContent(value: unknown): value is string;
export declare function hasStringOrNumberContent(value: unknown): value is number | string;
export declare function splitName(name?: string | null): string[];
export declare function splitCommaList(str?: string | null): string[];
export declare function formatFullName(firstName?: string, lastName?: string): string;
export declare function formatNumberTemplates(value: undefined | string | null, templates: string[]): string;
export declare function formatPhoneNumber(value?: string | null): string;
export declare function formatDate(value?: string | null, dateFormat?: string): string;
export declare function formatDateTime(value?: string | null): string;
export declare function getNameOrDefault(obj?: unknown, { field, defaultValue }?: {
field?: string;
defaultValue?: string;
}): any;
export declare function getOrDefault(value?: any): any;
export declare function formatSocialSecurityNumber(value?: null | string): string;
export declare function formatEmployerIdNumber(value?: null | string): string;
export declare function formatPercentage(value?: null | number | string, decimalPoints?: number): string;
export declare function formatMoney(value?: null | number | string): string;
export declare function formatDollars(value?: null | number | string): string;
export declare function formatParagraphs(value?: null | string): "--" | JSX.Element[];
export declare function formatCommaSeparatedNumber(value?: null | number | string): string;
export declare function formatDelimitedList(list?: null | string[], delimiter?: string): any;
export declare function mapBooleanToText(bool?: boolean | null, { mapUndefinedToNo }?: {
mapUndefinedToNo: boolean;
}): "--" | "Yes" | "No";
export declare function formatMoneyInput(value?: null | number | string): number;
export declare function formatDuration(iso8601?: null | string): string;
export declare function formatWebsite(website?: string | null, text?: string): string | JSX.Element;
export declare function stripNonAlpha(str?: string | null): string;
export declare function pluralize(baseWord: string, pluralSuffix: string, count: number): string;
export declare function getType(fullType?: null | string): string;
export declare function preserveNewLines(body: string): string;
export declare function parseAndPreserveNewlines(body?: string): any;
export declare function getDisplayName(component: any): string | undefined;
export declare const varToLabel: (str: string) => string;
export declare function getInitials(value?: string | null): string;
export declare function toKey(dict: {
[key: string]: any;
}): string;
export declare function formatAddress(address?: IAddress | null): string;
export declare function formatAddressMultiline(address?: IAddress | null): any;
2 changes: 1 addition & 1 deletion dist/global.module.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
declare module 'html-react-parser';
declare module 'html-react-parser';
12 changes: 6 additions & 6 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './constants';
export * from './containers';
export * from './date';
export * from './formatting';
export * from './utils';
export * from './validation';
export * from './constants';
export * from './containers';
export * from './date';
export * from './formatting';
export * from './utils';
export * from './validation';
8 changes: 8 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

'use strict'

if (process.env.NODE_ENV === 'production') {
module.exports = require('./utils.cjs.production.min.js')
} else {
module.exports = require('./utils.cjs.development.js')
}
14 changes: 7 additions & 7 deletions dist/interfaces.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface IAddress {
address1?: string | null;
address2?: string | null;
city?: string | null;
state?: string | null;
zip_code?: string | null;
}
export interface IAddress {
address1?: string | null;
address2?: string | null;
city?: string | null;
state?: string | null;
zip_code?: string | null;
}
Loading

0 comments on commit 411f761

Please sign in to comment.