Tea School

screenshot of Tea School
scss

Simplified HTML + CSS --> PDF Generator for Nodejs

Overview

Tea-School is an innovative package that simplifies the process of generating PDFs by combining three powerful libraries: PugJS, Node-Sass, and Puppeteer. Designed specifically for Node.js developers, this tool allows for dynamic HTML and CSS generation at runtime, making it easier than ever to create professional-looking documents from templates. With its straightforward approach, Tea-School offers a practical solution for those needing to convert HTML content into PDFs without the usual complexities involved in the process.

Using this package is hassle-free, even for those who are more accustomed to JavaScript than TypeScript. Whether you're looking to automate report generation or create styled documents for web applications, Tea-School puts the power of real-time HTML and CSS rendering directly in your hands.

Features

  • Real-time HTML Generation: Utilizes PugJS to generate HTML on the fly, enabling dynamic content rendering.
  • Dynamic CSS Styling: Leverages Node-Sass for real-time CSS processing, allowing for easily customizable styles.
  • PDF Creation: Integrates Puppeteer to convert generated HTML directly into high-quality PDFs, making document distribution seamless.
  • TypeScript Compatibility: Designed to work smoothly with TypeScript, yet remains easily adaptable for JavaScript users.
  • Example Usage Provided: Comes with an examples folder that demonstrates how to use the package effectively, simplifying the learning curve.
  • Simple Installation: Can be easily installed using npm or yarn, making it accessible for developers of all experience levels.
  • Reserved Key Warning: A note on the importance of not misusing the reserved compiledStyle key in Pug options, ensuring stability in applications.
scss
SCSS

SCSS is a preprocessor scripting language that extends the capabilities of CSS by adding features such as variables, nesting, and mixins. It allows developers to write more efficient and maintainable CSS code, and helps to streamline the development process by reducing repetition and increasing reusability.

Pug

Pug is a high-performance template engine for Node.js and browsers that enables developers to write HTML templates using a concise and intuitive syntax. It supports a range of features, including template inheritance, conditionals, loops, mixins, and more, and can be easily integrated into a variety of web frameworks and build tools.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.