Socket
Socket
Sign inDemoInstall

@11ty/eleventy-plugin-bundle

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@11ty/eleventy-plugin-bundle - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

9

codeManager.js

@@ -21,2 +21,3 @@ const BundleFileOutput = require("./BundleFileOutput");

this.toFileDirectory = undefined;
this.bundleExportKey = "bundle";
}

@@ -36,2 +37,10 @@

setBundleExportKey(key) {
this.bundleExportKey = key;
}
getBundleExportKey() {
return this.bundleExportKey;
}
reset() {

@@ -38,0 +47,0 @@ this.pages = {};

2

eleventy.bundle.js

@@ -14,2 +14,3 @@ const pkg = require("./package.json");

hoistDuplicateBundlesFor: [],
bundleExportKey: "bundle", // use a `bundle` export in a 11ty.js template to populate bundles
}, options);

@@ -46,2 +47,3 @@

toFileDirectory: pluginOptions.toFileDirectory,
bundleExportKey: pluginOptions.bundleExportKey, // `false` will skip bundle export
});

@@ -48,0 +50,0 @@ });

@@ -25,2 +25,6 @@

if(bundleOptions.bundleExportKey !== undefined) {
managers[name].setBundleExportKey(bundleOptions.bundleExportKey);
}
if(bundleOptions.outputFileExtension) {

@@ -27,0 +31,0 @@ managers[name].setFileExtension(bundleOptions.outputFileExtension);

2

package.json
{
"name": "@11ty/eleventy-plugin-bundle",
"version": "2.0.1",
"version": "2.0.2",
"description": "Little bundles of code, little bundles of joy.",

@@ -5,0 +5,0 @@ "main": "eleventy.bundle.js",

@@ -44,17 +44,21 @@ # eleventy-plugin-bundle

eleventyConfig.addBundle("css", {
// Optional, folder (relative to output directory) files will write to:
// (Optional) Folder (relative to output directory) files will write to
toFileDirectory: "bundle",
// Optional, defaults to bundle name
// (Optional) File extension used for bundle file output, defaults to bundle name
outputFileExtension: "css",
// Optional, defaults to bundle name
// (Optional) Name of shortcode for use in templates, defaults to bundle name
shortcodeName: "css",
// shortcodeName: false, // don’t add a shortcode.
// shortcodeName: false, // disable this feature.
// Optional, modify bundle content
// (Optional) Modify bundle content
transforms: [],
// Optional (advanced): if two identical code blocks exist in non-default buckets, they’ll be hoisted to the first bucket in common.
// (Optional) If two identical code blocks exist in non-default buckets, they’ll be hoisted to the first bucket in common.
hoist: true,
// (Optional) In 11ty.js templates, having a named export of `bundle` will populate your bundles.
bundleExportKey: "bundle",
// bundleExportKey: false, // disable this feature.
});

@@ -61,0 +65,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc