@zilero/gulp-pug-compiler
v1.0.4
Published
A Gulp plugin for compiling Pug templates to HTML with support for layouts, includes, and custom options
Maintainers
Readme
🏗️ Powerful Gulp plugin for Pug template compilation with hooks support.
Installation • Options • Example
✨ Features
- 📄 Pug to HTML compilation
- 🔄 Pre and post compilation hooks
- 📝 TypeScript support
- 🚀 Stream-based processing
- 💡 Progress logging
- 🛠️ Full Pug options support
🚀 Installation
npm install @zilero/gulp-pug-compiler --save-dev
# or
yarn add @zilero/gulp-pug-compiler --dev
# or
pnpm add @zilero/gulp-pug-compiler --save-dev⚙️ Options
pugOptions
- Type:
Options(from pug) - Required:
false - Pug compilation options
pluginOptions
- Type:
object - Required:
false
pluginOptions.onAfterCompile
- Type:
(content: string) => Promise<string> | string - Required:
false - Transform content after compilation
📝 Example
gulp.task('advanced-compile', () => {
return gulp.src('src/**/*.pug')
.pipe(GulpPugCompiler({
pugOptions: {
pretty: true,
doctype: 'html',
locals: {
title: 'My Website'
}
},
pluginOptions: {
onAfterCompile: (content) => {
// Custom post-processing
return content;
}
}
}))
.pipe(gulp.dest('dist'));
});🤝 Contributing
If you would like to contribute to the project, please create a pull request or leave feedback. We are always open to new ideas and improvements!
🐛 Issues
Found a bug? Want to request a feature? Please create an issue.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
Made with ❤️ by Zilero
