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

kalastatic

Package Overview
Dependencies
Maintainers
5
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kalastatic - npm Package Compare versions

Comparing version 6.0.0-alpha1 to 6.0.0-alpha2

8

package.json

@@ -5,3 +5,3 @@ {

"repository": "https://github.com/kalamuna/kalastatic.git",
"version": "6.0.0-alpha1",
"version": "6.0.0-alpha2",
"type": "module",

@@ -15,5 +15,5 @@ "license": "MIT",

"dependencies": {
"drupal-twig-extensions": "^1.0.0-beta.4",
"meow": "^12.0.1",
"sass": "^1.58.3",
"drupal-twig-extensions": "^1.0.0-beta.5",
"meow": "^12.1.1",
"sass": "^1.69.5",
"twig": "^1.16.0"

@@ -20,0 +20,0 @@ },

// This script would exist within the node module and doesn't need to be invoked during a real project
import {
promises as fs
promises as fs,
} from 'fs';
import { extname, basename, dirname } from 'path';
import Twig from "twig";

@@ -157,6 +158,8 @@

export const createDestinationDir = (destination) => {
// Ensure the destination directory is created.
const pathPieces = destination.split("/");
pathPieces.pop();
fs.mkdir(pathPieces.join("/"), { recursive: true });
let directory = dirname(destination)
if (directory) {
return fs.mkdir(directory, {
recursive: true
});
}
}

@@ -200,3 +203,2 @@

// Executes the other functions of Kstat

@@ -260,3 +262,13 @@ export const kstat = async (config) => {

const compiledHtml = await compileTwig(source, page, renderData, config).catch(err => console.log(err.message));
writeHtml(`${destination}/${page.replace(`${source}/`, "").replace(".twig", "")}`, compiledHtml);
// Find the correct output filename.
let destinationFilename = page
.replace(`${source}/`, '')
.replace('.twig', '');
if (extname(destinationFilename) == '.html' && basename(destinationFilename, '.html') != 'index') {
destinationFilename = destinationFilename.replace(basename(destinationFilename), basename(destinationFilename, '.html') + '/index.html');
}
// Write the file.
writeHtml(`${destination}/${destinationFilename}`, compiledHtml);
}

@@ -263,0 +275,0 @@

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