Skip to content

coasys/rollup-plugin-dna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Rollup-plugin to load DNA files as modules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published