mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-13 14:17:01 +00:00
It's possible to pass a `--require` option to mocha to load a script that sets up `process.env.DAPP_PATH` as needed for embark's tests; that approach is preferable to running mocha in a child process because when running in a child process there seemed to be problems with sources maps and with VS Code's debugger. After the changes in this PR, the following works as expected, i.e. when there are runtime errors line/col numbers are reported per the files in `src/`: ``` $ yarn build:no-ui $ cd packages/embark $ npx mocha "dist/test/**/*.js" \ --exit \ --no-timeouts \ --require ./scripts/test.js \ --require source-map-support/register ``` And the following VS Code launch config works well for me: ```json { "type": "node", "request": "launch", "name": "test - packages/embark", "cwd": "${workspaceFolder}/packages/embark", "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", "args": [ "'dist/test/**/*.js'", "--exit", "--no-timeouts", "--require", "./scripts/test.js", "--require", "source-map-support/register" ], "autoAttachChildProcesses": true, "sourceMaps": true } ``` NOTE for VS Code users: I found it's important to specify `"'dist/test/**/*.js'"` in the launch config instead of `"\"dist/test/**/*.js\""`, and that it's important to specify `"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha"` vs. `"program": "${workspaceFolder}/packages/embark/node_modules/.bin/mocha"`. KNOWN ISSUES: when there are runtime errors during `yarn test` in `packages/embark`, line/col numbers reflect the sources in `package/embark/dist` because `nyc` isn't setup correctly to use the source-maps generated by babel. A solution has not yet been found.
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%