#!/usr/bin/env node const IpfsHttpClient = require('ipfs-http-client') const { globSource } = IpfsHttpClient const folder = process.cwd() + '/dist/apps/remix-ide'; (async () => { const host = 'ipfs.remixproject.org' const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' }) try { let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false }) const hash = result.cid.toString() console.log(hash) } catch (e) { console.log(e) } })()