Skip to content

Commit

Permalink
Fix export issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pfych committed Jun 13, 2023
1 parent 3e32e48 commit 53bd95d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ const { build } = require('esbuild');
const shared = {
entryPoints: ['src/index.ts'],
bundle: true,
minify: true,
};

(async () => {
await Promise.all([
build({
...shared,
outfile: 'dist/index.js',
format: 'cjs',
}),
build({
...shared,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pfych-table",
"version": "1.0.5",
"version": "1.0.6",
"description": "Generate a sortable HTML Table based off of config & a data object",
"homepage": "https://github.com/pfych/pfych-table",
"author": "Pfych (https://pfy.ch)",
Expand Down
6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Column } from './types';

const createSortableTable = (table: Element): void => {
export const createSortableTable = (table: Element): void => {
let lastClicked = '';

const sortRows = (sortBy: string, header: Element, rows: Element[]) => {
Expand Down Expand Up @@ -59,7 +59,7 @@ const createSortableTable = (table: Element): void => {
});
};

const renderTable = <T>(args: {
export const renderTable = <T>(args: {
columns: Column<T>[];
data: T[];
sortable?: boolean;
Expand Down Expand Up @@ -112,5 +112,3 @@ const renderTable = <T>(args: {

return wrapper;
};

export { renderTable, createSortableTable, Column };

0 comments on commit 53bd95d

Please sign in to comment.