GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - esfiddle/code-blocks: Converts code snippets to ascii blocks

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
demo.png
demo.png
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Code Blocks!

Do npm i @esfiddle/blockify in your project! Then use it like this:

let blockify = require('@esfiddle/blockify');

let fs = require('fs'); // not needed for blockify, but needed for this demo


let code = `function test() {
	console.log('This is test code!');
}`

blockify(code).then(buffer => {
	// `buffer` is now an image buffer. You can save this wherever
	// you need to, or do whatever you need to do with it.
	// For now, let's save it as out.png
	fs.writeFileSync('out.png', buffer);
	console.log("YAY WE'RE DONE!");
})

It will produce this!

demo

About

Converts code snippets to ascii blocks

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.