mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-13 06:06:51 +00:00
Sinceee56f37713
, any deployment hook that was using simple `console.log()` statements to output information, would result in unexpected `[[object object], [object object]]`. Unfortunately, the reason for that was that we switched from non-arrow functions to arrow functions [here](ee56f37713 (diff-a7c4cef8bfebeb39fcd092aca5570fecL324-L340)
). Usually switching from non-arrow functions to arrow functions solves a lot of lexical scope issues where the current reference of `this` isn't pointing at the right thing. We're tempering with the global `console.log` inside Embark, which then, combined with **proper** lexical scope, causes the output described above. Generally there are a few ways to go about this: 1. Ensure that our custom log functions doesn't turn every log statement into an array output 2. Tell users not to use `console.log` inside deployment hooks and instead rely on `deps.logger` 3. Revert the changes made in the mentioned commit and use non-arrow functions inside `interceptLogs` Option 2) is not really a solution as we can't simply tell our users that they can't use one of the most used functions in JavaScript. Option 1) requires finding out why we're formatting logs by default in an array shapre in the first place. On top of that, we might be relying on this inside Embark, so it could break certain output. Option 3) seems to be the most pragmatic solution for now as it doesn't introduce any of the downsides mentioned above at the cost of using non-arrow functions.
What is Embark
Embark is a framework that allows you to easily develop and deploy Decentralized Applications (DApps).
A Decentralized Application is a serverless html5 application that uses one or more decentralized technologies.
Embark currently integrates with EVM blockchains (Ethereum), Decentralized Storages (IPFS), and Decentralized communication platforms (Whisper and Orbit). Swarm is supported for deployment.
With Embark you can:
Blockchain (Ethereum)
- Automatically deploy contracts and make them available in your JS code. Embark watches for changes, and if you update a contract, Embark will automatically redeploy the contracts (if needed) and the dapp.
- Contracts are available in JS with Promises.
- Do Test Driven Development with Contracts using Javascript.
- Keep track of deployed contracts; deploy only when truly needed.
- Manage different chains (e.g testnet, private net, livenet)
- Easily manage complex systems of interdependent contracts.
Decentralized Storage (IPFS, Swarm)
- Easily Store & Retrieve Data on the DApp through EmbarkJS. Including uploading and retrieving files.
- Deploy the full application to IPFS or Swarm.
- Import and deploy contracts hosted on Swarm.
Decentralized Communication (Whisper, Orbit)
- Easily send/receive messages through channels in P2P through Whisper or Orbit.
Web Technologies
- Integrate with any web technology including React, Foundation, etc..
- Use any build pipeline or tool you wish, including grunt, gulp and webpack.
$ npm -g install embark
Description
Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms
https://framework.embarklabs.io/
Languages
JavaScript
73.9%
TypeScript
14%
CSS
8%
HTML
4.1%