UNPKG

@web-alchemy/fonttools

Version:

This is the Node.js adapter of [python font tools](https://github.com/fonttools/fonttools) via [Pyodide](https://pyodide.org) without having to install python and its dependencies.

14 lines (12 loc) 457 B
const { preparePyodide } = require('../../pyodide.js') const { getPythonSubsetFunction } = require('./get-python-subset-function.js') async function main(args = process.argv.slice(2)) { const pyodide = await preparePyodide() pyodide.FS.mount(pyodide.FS.filesystems.NODEFS, { root: '.' }, '.') const pythonFunction = await getPythonSubsetFunction(pyodide) const exitCode = pythonFunction(args) process.exit(exitCode) } module.exports = { main }