Skip to content

Commit

Permalink
🦄 feature: Allow for better ESM until v1 (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrosenbauer authored Sep 11, 2024
1 parent c3a2185 commit 50f4804
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { default } from './lib/tempo';
export { tempo, tempo as default } from './lib/tempo';
export { TempoDocument } from './lib/tempo-document';
export { TempoText } from './lib/tempo-text';
export {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/__tests__/tempo.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe , it, expect } from 'vitest';
import { describe, it, expect } from 'vitest';

import { TempoDocument } from '../tempo-document';
import tempo from '../tempo';
import { tempo } from '../tempo';

describe('tempo', () => {
it('should return a document', () => {
Expand Down
4 changes: 1 addition & 3 deletions src/lib/tempo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ import { TempoDocument, type TempoDocumentNode } from './tempo-document';
* @param documentNodes A list of DocumentNodes to initialize the Document.
* @returns A new Document instance.
*/
const tempo = (documentNodes?: TempoDocumentNode[]): TempoDocument => {
export const tempo = (documentNodes?: TempoDocumentNode[]): TempoDocument => {
return new TempoDocument(documentNodes);
};

export default tempo;

0 comments on commit 50f4804

Please sign in to comment.