Skip to content

Commit 17ce5ef

Browse files
committed
Export methods for loading pyodide.
1 parent 4c80ded commit 17ce5ef

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
export { initialisePython, celldl2cellml } from './bg2cellml'
44
export type { CellMLOutput, RdfInterface } from './bg2cellml'
55

6-
// Export Pyodide's API
6+
// Export module loading functions
7+
8+
export { loadInBrowser } from './pyodide/web'
9+
export { loadInNode } from './pyodide/node'
10+
export type { LoadInBrowserOption, LoadInNodeOption} from './pyodide/types'
11+
12+
// Also export Pyodide's API
713

814
export type { PyodideAPI } from 'pyodide'

src/pyodide/node.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import { loadPyodide, type PyodideAPI } from 'pyodide'
1111

1212
import type { LoadInNodeOption } from './types'
13-
export type { LoadInNodeOption } from './types'
1413

1514
/**
1615
* Load `pyodide` in `node` using the loader wrapped for Vite

src/pyodide/web.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import { loadPyodide, type PyodideAPI } from 'pyodide'
1010

1111
import type { LoadInBrowserOption } from './types'
12-
export type { LoadInBrowserOption } from './types'
1312

1413
/**
1514
* Load `pyodide` in the browser using the loader wrapped for Vite

0 commit comments

Comments
 (0)