mirror of
				https://github.com/python-LimeReport/pypi.git
				synced 2025-11-04 07:51:23 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			624 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			624 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
const htmlmin = require("html-minifier");
 | 
						|
 | 
						|
module.exports = function(eleventyConfig) {
 | 
						|
    eleventyConfig.addTransform("htmlmin", function(content, outputPath) {
 | 
						|
      if (outputPath.endsWith(".html")) {
 | 
						|
        let minified = htmlmin.minify(content, {
 | 
						|
          useShortDocType: true,
 | 
						|
          removeComments: true,
 | 
						|
          collapseWhitespace: true,
 | 
						|
        })
 | 
						|
 | 
						|
        return minified;
 | 
						|
      }
 | 
						|
    })
 | 
						|
 | 
						|
    return {
 | 
						|
        dir: {
 | 
						|
          input: 'src',
 | 
						|
          output: 'dist',
 | 
						|
          includes: 'includes',
 | 
						|
          layouts: 'layouts',
 | 
						|
          data: 'data',
 | 
						|
        },
 | 
						|
        dataTemplateEngine: 'njk',
 | 
						|
    }
 | 
						|
} |