Skip to content

About

Bundle website files.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

45 Commits

Folders and files

Repository files navigation

Bundle 1.0.2

Bundle website files. Developed by Anna Svensson.

Screenshot

How to install an extension

Download ZIP file and copy it into your system/extensions folder. Learn more about extensions.

How to bundle website files

This extension bundles and minifies files for a better loading time. Your website may contain multiple CSS and JavaScript files. Usually these will be cached in the browser, but nevertheless each file has to be checked. This is where a file bundler comes in. It looks in the HTML header for included files and replaces them with one single file for CSS and one for JavaScript.

If you don't want that a file is bundled, specify data-bundle="exclude" in the HTML header.

Examples

Website with unbundled CSS and JavaScript files:

<!DOCTYPE html>
<html>
<head>
<title>Example page</title>
<link rel="stylesheet" href="/assets/gallery.css" />
<link rel="stylesheet" href="/assets/highlight.css" />
<link rel="stylesheet" href="/assets/stockholm.css" />
<script defer="defer" src="/assets/gallery-photoswipe.min.js"></script>
<script defer="defer" src="/assets/gallery.js"></script>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>

Website with bundled CSS and JavaScript files:

<!DOCTYPE html>
<html>
<head>
<title>Example page</title>
<link rel="stylesheet" href="/assets/bundle-dfd1ef8a4c.min.css" />
<script defer="defer" src="/assets/bundle-3808f805bc.min.js"></script>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>

Website with bundled and unbundled files:

<!DOCTYPE html>
<html>
<head>
<title>Example page</title>
<link rel="stylesheet" href="/assets/bundle-dfd1ef8a4c.min.css" />
<script defer="defer" src="/assets/bundle-3808f805bc.min.js"></script>
<script defer="defer" data-bundle="exclude" src="/assets/debug.js"></script>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>

Acknowledgements

This extension includes Minify 1.3.75 by Matthias Mullie. Thank you for the useful library.

Do you have questions? Get help.

About

Bundle website files.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Contributors

Languages