
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
An extremely simple static site generator supporting ejs
This module will generate static sites from ejs files. This allows you to deploy your site on a static provider such as GitHub pages.
I created this because I couldn't find a super simple module or CLI app to do it. Harp exists, but apparently Node 12 isn't supported.
Module
npm install ejs2static --save
const Generator = require('ejs2static');
const generator = new Generator(options);
gen.generate() // returns a Promise that resolves once all files are generated
options
(optional)sourceDir
- This directory will be searched recursively for files. EJS files will be rendered to HTML and copied to the outputDur
retaining the directory structure.outputDir
- Generates to the static site to this directory.This directory will be cleared before generation if empty
option is true!copyAll
(optional - default false
) - If true, all non ejs files in the sourceDir
will be copied to the buildDir
. This is helpful for copying assets.data
- (optional - default {}
) - Object with keys of files relative to the sourceDir
and values of an object that will be passed as data to the ejs render when the file specified in the key is rendered. (Huh? Check the examples).empty
- (optional - default false
) - If true, the outputDir will be cleared before render.├── dist
│ ├── components
│ │ └── head.html
│ ├── dir
│ │ └── dirtest.html
│ ├── test-file.txt
│ └── test.html
├── ejs
│ ├── components
│ │ └── head.ejs
│ ├── dir
│ │ └── dirtest.ejs
│ ├── test-file.txt
│ └── test.ejs
└── test.js
// test.js
const Generator = require('../ejs2static');
const gen = new Generator({
sourceDir: './ejs',
outputDir: './dist',
copyAll: true,
data: {
'./dir/dirtest.ejs': {
someData: "testing data"
}
}
});
gen.generate().then(_ => console.log("Done!"));
MIT
FAQs
An extremely simple static site generator supporting ejs
The npm package ejs2static receives a total of 7 weekly downloads. As such, ejs2static popularity was classified as not popular.
We found that ejs2static demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.