Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms https://framework.embarklabs.io/
Go to file
Michael Bradley, Jr de0f02d00a build: make DApp templates member packages of the monorepo
Previously, templates were in a subdirectory of `packages/embark`. Reorganize
them so that they are member packages of the monorepo. This allows them to
cleanly depend on other members of the monorepo,
e.g. `embarkjs-connector-web3`.

It is desirable for the templates, in the context of the monorepo, to specify
embark as a dependency, to take advantage of `npx embark test` (and it's a
"forward looking" setup re: how we plan to evolve embark). However, if embark
were to specify the template packages as dependencies a circular relationship
would be introduced, which is [unsupported by Lerna][circular]. Therefore,
revise the template generator so that all templates are resolved / fetched at
runtime, i.e. `boilerplate`, `demo`, and `simple` are no longer
"built-ins" *per se*. This change won't be apparent to embark's users, but it
does mean that the template generator won't work (in a production install of
embark) if it can't connect to the npm registry, i.e. when the user runs
`embark demo` or `embark new [--simple]`. When embark is inside the monorepo,
templates are resolved and copied from the yarn workspace rather than being
fetched from the registry, which is convenient for development. Also, any
template dependencies that are members of the monorepo are linked into the
copied template's `node_modules` rather than being installed from the registry,
again for convenience. During template generation, remove scripts and
dependencies that pertain only to membership in the monorepo; for now, that
involves removing embark as a dependency since we're not quite ready for that
arrangement to be the default, i.e. outside of the monorepo.

Refactor the root scripts so that more of them can consistently be used with
Lerna's filter options, e.g. `--scope` and `--ignore`. "Combo" scripts that
don't support filtering generally have a `:full` postfix.

Flip `clean` and `reset` scripts at the root and in the member packages for
consistency re: Lerna's notion of `clean` and embark's notion of `reset`. Have
each package run its `reset` script when its `clean` script is invoked (and
that's all for now), relying on `lerna clean` to delete packages'
`node_modules` in view of how Lerna's topological sorting works.

Lift the implementation of `embark reset` into a private package in
`packages/embark-reset` and make it a bundled dependency of embark. Packages in
`dapps/*` depend on `embark-reset` directly and make use of it with `npx
embark-reset` (but only in monorepo context). This removes a "wart" where
reboots could show errors when embark's sources aren't already built in
`packages/embark/dist`. Users will not notice any difference since `embark
reset` works as before, transparently making use of the `embark-reset`
package. The only downside to having it be a bundled dependency of embark is
that bundled deps have all of their `node_modules` included in the tarball
built with `npm pack` (that's why having the templates as bundled dependencies
of embark isn't a viable approach). However, `embark-reset` only has one
dependency, `rimraf`, which is a tiny module, so the cost seems acceptable.

As part of the reorganization, move `test_dapps` into `dapps/tests` and
`packages/embark/templates` into `dapps/templates`. Keep the directory names
short but revise the package names to facilitate simple filtering with
`embark-dapp-*`. Consolidate `.yarnrc` and `.gitignore` and clean up some
redundant ignore listings.

Scripts run with `--scope embark-dapp-*` use `--concurrency=1` to avoid
conflicts that could arise over network ports. The `ci:full` and `qa:full`
scripts use `--concurrency=1` in all scopes, for two reasons: resource
limitations on Travis and AppVeyor result in slower runs with concurrency >1,
and if something fails in those contexts it's easier to see what went wrong
when Lerna's output isn't interleaved from a bunch of scripts in `packages/*`.

Bump the Lerna version.

[circular]: https://github.com/lerna/lerna/issues/1198#issuecomment-442278902
2019-03-05 10:20:57 -06:00
.github chore: introduce issue and pull request templates 2018-11-07 17:31:17 +01:00
dapps build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
packages build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
scripts build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
.editorconfig Add editor config 2018-10-22 19:25:16 +02:00
.eslintrc.json build: cleanup eslint configuration 2019-02-06 11:26:41 -06:00
.gitignore build: cleanup .gitignore 2019-02-05 18:08:14 -06:00
.npmrc build: introduce a `prepare` script in embark's package.json 2018-12-03 16:24:10 -06:00
.travis.yml build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
.yarnrc build: specify a high network timeout in root .yarnc 2019-02-14 01:26:22 -06:00
CODE_OF_CONDUCT.md chore(@embark) remove extra line 2018-12-24 16:14:01 -05:00
CONTRIBUTING.md build: implement a monorepo with Lerna 2019-02-04 14:28:49 -06:00
LICENSE add license 2015-07-10 20:41:45 -04:00
README.md feature(embark): add coveralls integration 2019-02-08 17:07:05 -05:00
appveyor.yml build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
babel.config.js build: implement a common babel config 2019-02-06 11:34:47 -05:00
header.png Update header 2018-09-27 10:23:03 -04:00
lerna.json build: implement a monorepo with Lerna 2019-02-04 14:28:49 -06:00
package.json build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
tsconfig.json fix: supply missing tsconfig.json in packages/* 2019-02-06 17:20:13 -06:00
tslint.json refactor(@embark/embark-typings) move typings to its own module 2019-02-06 11:07:44 -05:00
yarn.lock build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00

README.md

Embark

npm Gitter Build Status Build status Open PRs Closed PRs GitHub commit activity the past week, 4 weeks, year Coverage Status

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

See Complete Documentation.