This package has been deprecated

Author message:

Due to trademarked naming concerns, please use @buidlerlabs/rollup-plugin-hashgraph-venin from now on. Sorry for any inconveniance.

@buidlerlabs/rollup-plugin-hedera-strato
TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published

Hedera Strato Rollup

Discord support channel contributions license node version

... rollup's best friend for bundling Strato

Quick. No questions asked, TL;LDR;

Do a

npm install --save-dev @buidlerlabs/rollup-plugin-hedera-strato

then, in your rollup.config.json or any other Rollup config option of preference, do

import strato from "@buidlerlabs/rollup-plugin-hedera-strato";

//...
export default {
  //...
  plugins: [
    strato(),
    //...
  ]
  //...
}

That's it! 🍾 Now you can bundle your dApp and have Strato embedded in it, ready to be used. 🥂

Config-ing

You can configure the plugin by passing in an object with the following properties and meaning:

Prop Description
contracts.path Where to load the solidity contracts from
contracts.recurse true to deep load all the inner directory's contracts from contracts.path, false to only load the provided top directory
environment The environment object passed to Strato to be used when creating ApiSession.default instances
includeCompiler true to embed a web-worker that will allow in-browser compilation (note: the solidity compiler is lazy loaded the first time a Contract.newFrom/Contract.allFrom is called) and false if you don't intend to use this feature (conserves bandwidth)
sourceMap true to include the source-map (helpful for debugging), false otherwise

Embedding the plugin with no such object is equivalent to virtually calling:

strato({
  contracts: {
    path: './contracts',
    recurse: false
  },
  environment: process.env,
  includeCompiler: false,
  sourceMap: false
})

For an immediate working example, have a look at our bundler recipe used by our test-base.

Further docs

Need more context and configurability? Check our official docs page for more info.

Testing it

Have the .env file ready (see above) and run

$ npm test

Contributions

... are more then welcome! Head over to our issues page and let us know your thoughts or, better yet, open that PR and lets discuss it there!

Oh! And if you ever feel like talking to us, you can reach us on discord. We're very friendly! 👨‍👩‍👧‍👦

License

This work has been published under the MIT License.

/@buidlerlabs/rollup-plugin-hedera-strato/

    Package Sidebar

    Install

    npm i @buidlerlabs/rollup-plugin-hedera-strato

    Weekly Downloads

    0

    Version

    0.8.0

    License

    MIT

    Unpacked Size

    67.9 kB

    Total Files

    24

    Last publish

    Collaborators

    • 3nigma
    • victorholo
    • vladuts