
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@resoc/create-img
Advanced tools
Use this package to turn a template and parameter values to an image.
Install:
npm install @resoc/create-img
Then, create an image:
createImage(
'path/to/resoc.manifest.json',
{
title: "A picture is worth a thousand words",
textColor: "#ffffff"
},
{
width: 1200,
height: 630
},
'path/to/output.jpg'
);
Puppeteer is used under the hood to generate images. You need to configure it depending on your environment.
In most environments, Puppeteer can be used directly. All you need is to install it:
npm install puppeteer
Resoc will just find it and use it.
Due to tight memory constraints, certain environments cannot use Puppeteer as is.
Install:
npm install puppeteer-core chrome-aws-lambda
Then, instanciate the browser yourself:
const chromium = require('chrome-aws-lambda');
const browser = await chromium.puppeteer.launch({
executablePath: await chromium.executablePath,
args: chromium.args,
headless: chromium.headless
});
createImage(
'path/to/resoc.manifest.json',
{
title: "A picture is worth a thousand words",
textColor: "#ffffff"
},
{ width: 1200, height: 630 },
'path/to/output.jpg',
{ browser }
);
FAQs
Create an image based on a Resoc image template
The npm package @resoc/create-img receives a total of 25 weekly downloads. As such, @resoc/create-img popularity was classified as not popular.
We found that @resoc/create-img 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.