---
title: "grunt-usemin Example"
description: "Minimal example of using grunt-usemin for asset optimization. Practical notes and code examples on grunt-usemin Example by."
url: "https://h3manth.com/scribe/grunt-usemin-example/"
canonical_url: "https://h3manth.com/scribe/grunt-usemin-example/"
markdown_url: "https://h3manth.com/scribe/blog/grunt-usemin-example.md"
publishDate: "2014-04-09T00:00:00.000Z"
author: "Hemanth HM"
category: "tools"
tags: ["grunt","build"]
word_count: 71
reading_time_minutes: 1
x_markdown_tokens: 250
content_signal: "ai-train=yes, search=yes, ai-input=yes"
---

# grunt-usemin Example

> Minimal example of using grunt-usemin for asset optimization. Practical notes and code examples on grunt-usemin Example by.

Minimal [grunt-usemin](https://github.com/yeoman/grunt-usemin) usage example.

## HTML Build Blocks

```html
<!-- build:css assets/css/style.min.css -->
<link rel="stylesheet" href="./assets/css/styles.css" />
<!-- endbuild -->

<!-- build:js assets/js/optimized.js -->
<script src="./assets/js/foo.js"></script>
<script src="./assets/js/bar.js"></script>
<!-- endbuild -->
```

## After Running Grunt

- CSS files concatenated and minified: `48 B → 39 B`
- JS files concatenated and uglified: `75 B → 58 B`
- HTML updated with new references

Read the full [README](https://github.com/yeoman/grunt-usemin/blob/master/README.md) for more details.
