0.0.300 • Published 2 years ago

@solid-integrations/rollup v0.0.300

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@solid-integrations/rollup

turborepo size version stage

A sample primitive that is made up for templating with the following options:

  • createCompiled - Returns a resource containing the rollup output after bundling the given code.
  • createCompiledCode - Composes createCompiled - instead returning an accessor containing the bundled code.

Installation

npm install @solid-integrations/rollup
# or
yarn add @solid-integrations/rollup
# or
pnpm add @solid-integrations/rollup

How to use it

createCompiled

const [files, setFiles] = createSignal({
  "main.js": "import {coolFun} from './coolFile.js'; coolFun()",
  "coolFile.js": "export function coolFun(){console.log('Hello World')}",
});
const [compiled] = createCompiled(files);
console.log(compiled()); // Displays rollup's output from bundling the code.
// This includes extra metadata, rather than just the file itself

createCompiledCode

const [files, setFiles] = createSignal({
  "main.js": "import {coolFun} from './coolFile.js'; coolFun()",
  "coolFile.js": "export function coolFun(){console.log('Hello World')}",
});
const compiled = createCompiledCode(files);
console.log(compiled()); // Displays the bundled code generated by rollup

Changelog

See CHANGELOG.md

0.0.300

2 years ago

0.0.200

2 years ago

0.0.100

2 years ago