0.0.3 • Published 8 months ago

@coasys/rollup-plugin-holochain v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

rollup-plugin-holochain

(former name: rollup-plugin-dna)

Rollup-plugin to load Holochain DNA or hApp bundle files as modules returning a string with base64 encoded binary data.

Usage

import dna from './hc-dna/languages.dna'
export const DNA = Buffer.from(dna, 'base64')

import happ from './hc-dna/workdir/my-app.happ'
export const BUNDLE = Buffer.from(dna, 'base64')

Installation

npm i @coasys/rollup-plugin-holochain -D

Config

In your rollup.config.js:

import { dna, happ } from '@coasys/rollup-plugin-holochain`

export default {
    ...
    plugins: [
        dna(),
        happ()
    ]
}

The dna plugin will only load files ending with .dna and creates an export called dna, while the happ pluging will only load files ending with .happ and it creates an export called happ.

0.0.3

8 months ago