Minimal grunt-usemin usage example.
HTML Build Blocks
<!-- 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 for more details.
#grunt#build
About Hemanth HM
Hemanth HM is a Sr. Machine Learning Manager at PayPal, Google Developer Expert, TC39 delegate, FOSS advocate, and community leader with a passion for programming, AI, and open-source contributions.