*Need to manage native modules
*Override __dirname *Override @achingbrain/ssdp, default-gateway, and ipfs-utils with forks to ensure no issues
This commit is contained in:
parent
175972b69d
commit
9d2979067a
5
build.js
5
build.js
|
@ -5,5 +5,8 @@ esbuild.buildSync({
|
||||||
outfile: 'dist/ipfs.js',
|
outfile: 'dist/ipfs.js',
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
bundle: true,
|
bundle: true,
|
||||||
platform: "node"
|
platform: "node",
|
||||||
|
define: {
|
||||||
|
__dirname: '"./plugins/leveldown"'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
node build.js
|
||||||
|
mkdir dist/dist -p
|
||||||
|
rsync -avzP node_modules/leveldown/prebuilds dist/leveldown
|
||||||
|
cp node_modules/rabin-wasm/dist/rabin.wasm dist/dist/rabin.wasm
|
|
@ -3,15 +3,19 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node build.js"
|
"build": "rimraf node_modules/*/node_modules/ipfs-utils node_modules/@achingbrain/nat-port-mapper/node_modules/default-gateway && bash build.sh"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@lumeweb/relay-types": "https://github.com/LumeWeb/relay-types.git",
|
"@lumeweb/relay-types": "https://github.com/LumeWeb/relay-types.git",
|
||||||
"esbuild": "^0.15.5"
|
"esbuild": "^0.15.5",
|
||||||
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@achingbrain/ssdp": "https://github.com/LumeWeb/ssdp.git",
|
||||||
|
"default-gateway": "https://github.com/LumeWeb/default-gateway.git",
|
||||||
"ipfs-core": "^0.15.4",
|
"ipfs-core": "^0.15.4",
|
||||||
"ipfs-http-response": "^3.0.4",
|
"ipfs-http-response": "^3.0.4",
|
||||||
|
"ipfs-utils": "https://github.com/LumeWeb/js-ipfs-utils.git",
|
||||||
"multiformats": "^9.7.1"
|
"multiformats": "^9.7.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue