1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

Add consume support for browsers.

This commit is contained in:
Pedro Gutiérrez 2019-04-08 16:09:35 +02:00 committed by Pedro Gutiérrez
parent 9a252d7731
commit dde934543c
3 changed files with 21 additions and 13 deletions

View File

@ -131,6 +131,7 @@ export class Brizo extends Instantiable {
}
private async downloadFile(url: string, destination?: string): Promise<string> {
if (destination) {
const response = await WebServiceConnectorProvider
.getConnector()
.get(url)
@ -146,5 +147,8 @@ export class Brizo extends Instantiable {
});
return destination
} else {
window.open(url, '_blank')
}
}
}

View File

@ -5,7 +5,8 @@
"lib": [
"es2017",
"es6",
"es7"
"es7",
"DOM"
],
"declaration": true,
"module": "commonjs",

View File

@ -9,6 +9,9 @@ module.exports = {
minimize: true,
noEmitOnErrors: true
},
node: {
fs: 'empty',
},
resolve: {
extensions: ['.js'],
modules: ['node_modules'],