Skip to content

Instantly share code, notes, and snippets.

@socheatsok78
Created February 17, 2022 04:27
Show Gist options
  • Save socheatsok78/9ece5dc5c1ffb710b0427aa5074277c8 to your computer and use it in GitHub Desktop.
Save socheatsok78/9ece5dc5c1ffb710b0427aa5074277c8 to your computer and use it in GitHub Desktop.
Vue.js style gradient string
var fs = require('fs')
var gradientString = require('gradient-string')
var out = gradientString([
{ color: '#42d392', pos: 0 },
{ color: '#42d392', pos: 0.1 },
{ color: '#647eff', pos: 1 }
])('Vue.js - The Progressive JavaScript Framework')
var data = out.replace(/\x1B/g, '\\x1B')
fs.writeFileSync('banner.txt', data, { encoding: 'utf-8' })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment