Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mouchetasse

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mouchetasse

Minimalist templating tool in typescript

  • 1.0.3
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

🪰☕️ Mouchetasse

Minimalist templating tool in typescript

Get started

Install the package

npm install mouchetasse

Example to try it

  1. In index.ts, add:
import { readFileSync } from 'fs'
import compile from 'mouchetasse'
const express = require('express')
const app = express();
const port = 3000

app.get('/', (_: any, res: any) => {
    const html: string = readFileSync("index.html", { encoding: "utf8" })
    const data = { /* TODO */ }
    res.send(compile(html, data))
})

app.listen(port, () => {
    console.log(`Example app listening on port http://localhost:${port}`)
})

2. In index.html, add:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>Hello {{name}}, wanna do some {{passion}}</h1>
</body>
</html>

FAQs

Package last updated on 31 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc