OpenMined / syft.js

The official Syft worker for Web and Node, built in Javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve build system

cereallarceny opened this issue · comments

We need to allow for the Syft.js build system to be compiled and usable (via NPM install). Currently the package is published here: https://www.npmjs.com/package/syft.js. We need to be able to include it in the following formats:

Methods of importing

ES6/7 import:

import syft from 'syft.js';

Require:

const syft = require('syft.js');

Script include:

<script src="/node_modules/syft.js/lib/index.js"></script>

Referencing in Javascript

const mySyft = new syft(url);

I can work on this

All yours. Would love to have a proof of concept in the examples too if you wouldn't mind! Not necessary, but would be nice. Came across this if it helps: https://medium.com/@kelin2025/so-you-wanna-use-es6-modules-714f48b3a953

Closed by #35