Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/lowmess/hero-patterns. Use patterns from heropatterns.com in your JavaScript lowm.es/hero-patterns
Something went wrong. Try again.
491 B · 16 lines
JavaScript
at master
1234567891011121314151617// @preval
const randomColor = require('randomcolor')const combo = require('random-a11y-combo')const hero = require('../../dist/hero-patterns.cjs.js')
// pre-generate color combinations// this can make the build hang but speeds up the site tremendouslyconst combos = []const num = process.env.NODE_ENV === 'production' ? Object.keys(hero).length * 10 : 69const colors = randomColor({ count: num })for (const color of colors) { combos.push(combo(color))}
module.exports = combos