Skip to content

Commit

Permalink
feat: build core-eval script / permit with rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Jan 21, 2024
1 parent 8a2d65e commit 0370e2f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions contract/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
/**
* @file rollup configuration to bundle core-eval script
*
* Supports developing core-eval script, permit as a module:
* - import { E } from '@endo/far'
* We can strip this declaration during bundling
* since the core-eval scope includes exports of @endo/far
* - `bundleID = ...` is replaced using updated/cached bundle hash
* - `main` export is appended as script completion value
* - `permit` export is emitted as JSON
*/
// @ts-check
import {
coreEvalGlobals,
moduleToScript,
configureBundleID,
emitPermit,
} from './tools/rollup-plugin-core-eval.js';
import { permit } from './src/start-contractStarter.js';

/** @type {import('rollup').RollupOptions} */
const config = {
Expand All @@ -21,6 +34,7 @@ const config = {
cache: 'bundles',
}),
moduleToScript(),
emitPermit({ permit, file: 'deploy-starter-permit.json' }),
],
};
export default config;

0 comments on commit 0370e2f

Please sign in to comment.