Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
Dependencies
deno.land/x
Asset bundler for Deno apps
deno-buckets
Buckets is a wrapper around the native Deno emit, it allows you to select source files, and then bundle their resolved default exports.
Example
data.ts:
// is-deno-bucket
export default Deno.readTextFileSync("./lorem.txt");app.ts:
import data from "./data.ts";
console.log(data)Then run: buckets app.ts > app.bundle.js:
// app.bundle.js
const __default = 'Lorem ipsum dolor sit amet\n';
console.log(__default)Usage
Add the comment // is-deno-bucket at the beginning of the files you want to
resolve before bundling. Then, bundle your app with deno-buckets. Only the default export will be resolved.
CLI
Install:
deno install --allow-net --allow-read --allow-write --allow-env https://deno.land/x/buckets/buckets.tsRun:
buckets <entry_path> [out_file]API
import { bundle } from "https://deno.land/x/buckets/mod.ts";
const content = await bundle("./app.ts");
Deno.writeTextFileSync("app.bundle.js", content);© 2021 Jacobo Tabernero Rey - Released under MIT License