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

shopify-liquid

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shopify-liquid - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

tags/layout.js

2

index.js

@@ -61,3 +61,3 @@ const scope = require('./src/scope');

var tpl = this.options.cache && this.cache[filepath] ||
this.parse(fs.readFileSync(filepath));
this.parse(fs.readFileSync(filepath, 'utf8'));
return this.options.cache ? (this.cache[filepath] = tpl) : tpl;

@@ -64,0 +64,0 @@ }

{
"name": "shopify-liquid",
"version": "1.1.4",
"version": "1.1.5",
"description": "A Shopify Liquid Implementation in Node.js",

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

@@ -52,4 +52,6 @@ # shopify-liquid

## Include
## Includes and Layouts
### Includes
```

@@ -74,2 +76,26 @@ // file: color.liquid

### Layouts
```
// file: default-layout.html
Header
{% block content %}My default content{% endblock %}
Footer
// file: page.html
{% layout "default-layout" %}
{% block content %}My page content{% endblock %}
```
The output of `page.html`:
```
Header
My page content
Footer
```
* It's possible to define multiple blocks.
* block name is optional when there's only one block.
## Extension

@@ -136,2 +162,3 @@

`include` | [Document](https://help.shopify.com/themes/liquid/tags/theme-tags#include) | [Source](https://github.com/harttle/shopify-liquid/blob/master/tags/include.js) | [Test][tt]
`layout, block` | [Document](http://docs.mixture.io/templates/) | [Source](https://github.com/harttle/shopify-liquid/blob/master/tags/layout.js) | [Test][tt]

@@ -138,0 +165,0 @@

@@ -11,3 +11,2 @@ const _ = require('lodash');

}
return '';
},

@@ -14,0 +13,0 @@ set: function(k, v) {

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