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

squirrelly

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

squirrelly - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

_config.yml

2

package.json
{
"name": "squirrelly",
"version": "2.0.0",
"version": "2.0.1",
"description": "A simple yet powerful ExpressJS template engine that works out-of-the-box",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,6 +6,11 @@ # squirrelly

[![npm downloads](https://img.shields.io/npm/dt/squirrelly.svg)](https://www.npmjs.com/package/squirrelly)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/nebrelbug/crawlbug.svg)](https://github.com/nebrelbug/crawlbug)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/nebrelbug/squirrelly.svg)](https://github.com/nebrelbug/squirrelly)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b848f0c508e841cf8fd3ab7308cfee34)](https://www.codacy.com/app/nebrelbug/squirrelly?utm_source=github.com&utm_medium=referral&utm_content=nebrelbug/squirrelly&utm_campaign=Badge_Grade)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![GitHub forks](https://img.shields.io/github/forks/nebrelbug/squirrelly.svg?style=social&label=Fork)](https://github.com/nebrelbug/squirrelly/fork)
[![GitHub stars](https://img.shields.io/github/stars/nebrelbug/squirrelly.svg?style=social&label=Stars)](https://github.com/nebrelbug/squirrelly)
[![GitHub watchers](https://img.shields.io/github/watchers/nebrelbug/squirrelly.svg?style=social&label=Watch)](https://github.com/nebrelbug/squirrelly)
[![GitHub followers](https://img.shields.io/github/followers/nebrelbug.svg?style=social&label=Follow)](https://github.com/nebrelbug/squirrelly)
Squirrelly is an easy-to-use ExpressJS Template engine, allowing basic conditional statements and easy ExpressJS usage. Just pass in options and/or conditionals inside double brackets!

@@ -19,3 +24,3 @@

## Squirrelly basic setup
## Basic Usage

@@ -33,3 +38,3 @@ 1. Download [`squirrelly`](https://www.npmjs.com/package/squirrelly) (`npm install squirrelly --save`)

app.engine('sqrl', require('squirrelly').__express);//Set the template engine to squirrelly, and make it use .sqrl files. If you don't do this, you'll have to use the file extension .squirrelly
app.set('view engine', 'sqrl'); (use the template engine)
app.set('view engine', 'sqrl'); (use squirrelly as a template engine)

@@ -49,3 +54,3 @@

## Squirrelly Syntax
## Syntax

@@ -62,6 +67,6 @@ To use squirrelly, instead of creating an HTML file, create a `.sqrl` file. (This will only work if you inlude the following code:

<head>
<title>{{title}}</title>
<title>{{title}}</title> //Evaluates to <title>why you should use squirrelly</title>
</head>
<body>
<p>Because {{reason}}</p>
<p>Because {{reason}}</p> //Evaluates to <p>Because it's awesome</p>
</body>

@@ -71,2 +76,16 @@ </html>

### Recommended Use
Right now, squirrelly only has basic functionality with conditionals (though it's under active development.) But remember, squirrelly can parse anything, even content of `script` tags. We recommend using squirrelly inside script tags for advanced logic. A very basic example is shown below:
```
<script>
var userInfo = {{userInfo}};
if (userInfo !== null && userInfo !== undefined) {
document.getElementById("userInfo").innerHTML = {{userInfo}};
}
</script>
```
### Conditionals

@@ -100,2 +119,4 @@

Squirrelly is still under very active development, and all contributors would be appreciated. Just contact me or send me a pull request at Squirrelly's [Github Repo](https://github.com/nebrelbug/squirrelly). If you find any issues, submit an issue.
Squirrelly is still under very active development, and all contributors are welcome. Feel free to [fork](https://github.com/nebrelbug/squirrelly), clone, and mess around! Then, contact me, create an issue, or send a pull request at Squirrelly's [Github Repo](https://github.com/nebrelbug/squirrelly).
Beginners are welcome! We welcome all contributors, no matter what skill level.
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