Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

hero-patterns

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hero-patterns - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

hero-patterns.js

5

package.json
{
"name": "hero-patterns",
"version": "1.0.2",
"version": "1.1.0",
"description": "Patterns from heropatterns.com exported as ES6 functions",
"main": "index.js",
"main": "hero-patterns.js",
"scripts": {

@@ -46,2 +46,3 @@ "start": "yarn run browser_sync & NODE_ENV=development nodemon --exec 'yarn run test && yarn run build && browser-sync reload'",

"rollup": "^0.41.6",
"rollup-plugin-alias": "^1.2.1",
"rollup-plugin-babel": "^2.7.1",

@@ -48,0 +49,0 @@ "rollup-plugin-babili": "^2.0.0",

import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import json from 'rollup-plugin-json'
import alias from 'rollup-plugin-alias'
import babel from 'rollup-plugin-babel'
import babili from 'rollup-plugin-babili'
import fs from 'fs-extra'
import combo from 'random-a11y-combo'
import * as hero from './hero-patterns'
// Do some preprocessing to make sure the build goes right.
// Kind of gross to do it here,
// but that's sort of what Rollup is for, right?
// To build the site?
// delete 'dist', so that copying the index.html works

@@ -14,4 +22,20 @@ if (fs.existsSync('dist')) fs.emptyDirSync('dist')

fs.copySync('./site/index.html', './dist/index.html')
// pre-generate color combinations
// this can make the build hang but speeds up the site tremendously
let combos = []
let num = process.env.NODE_ENV === 'production' ? Object.keys(hero).length * 10 : 69
for (let i = num; i--;) {
combos.push(combo())
}
fs.outputJsonSync('./dist/combos.json', combos)
// OK now on to the actual Rollup stuff
let plugs = [
alias({
resolve: ['.js', '.json'],
combos: './../dist/combos',
'package.json': './../package',
'hero-patterns': './../hero-patterns'
}),
resolve({

@@ -18,0 +42,0 @@ main: true,

yarn.lock

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc