New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

symply

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

symply - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

dist/entities/globals.js

@@ -98,3 +98,3 @@ "use strict";

function getGlobalsFileNameWithoutExtension(fileName, extension) {
return fileName.replace(new RegExp(extension + '$'), '');
return fileName.replace(new RegExp(`\\${extension}$`), '');
}

@@ -71,3 +71,3 @@ "use strict";

function getHelpersFileName(fileName) {
return fileName.replace(new RegExp(HELPERS_EXTENSION + '$'), '');
return fileName.replace(new RegExp(`\\${HELPERS_EXTENSION}$`), '');
}

@@ -33,3 +33,3 @@ "use strict";

// TODO: add support for .md and .txt formats
const PARTIAL_EXTENTION = '.html';
const SUPPORTED_PARTIAL_EXTENTION_LIST = ['.html', '.hbs'];
function load() {

@@ -51,3 +51,9 @@ /*-----------------------------------------------------------------------------

const result = partials.reduce((acc, partial) => {
acc[getPartialName(partial.name)] = partial.contents;
const partialNameWithoutExtension = getPartialNameWithoutExtension(partial.name);
if (acc[partialNameWithoutExtension] !== undefined) {
logger_1.default.warning(`Detected partials with the same name "${partial.dirname}/${partialNameWithoutExtension}.*", but different extensions.`);
}
else {
acc[partialNameWithoutExtension] = partial.contents;
}
return acc;

@@ -73,4 +79,5 @@ }, {});

exports.load = load;
function getPartialName(fileName) {
return fileName.replace(new RegExp(PARTIAL_EXTENTION + '$'), '');
function getPartialNameWithoutExtension(fileName) {
const re = `(${SUPPORTED_PARTIAL_EXTENTION_LIST.map((ext) => '\\' + ext).join('|')})$`;
return fileName.replace(new RegExp(re), '');
}
{
"name": "symply",
"version": "0.2.3",
"version": "0.2.4",
"description": "A simple static site generator.",

@@ -5,0 +5,0 @@ "author": "Oleg Legun <oleg.legun@gmail.com>",

@@ -28,1 +28,16 @@ ![Logo](./assets/logo.png)

## Render partial by passed path as a parameter
```hbs
<!-- index.html -->
{{> partials/userCard iconPath='svg/icons/user-1' }}
```
```hbs
<!-- partials/userCard.html -->
<div class="UserCard">
{{> (lookup . 'iconPath' ) }}
</div>
```
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