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

@symbo.ls/init

Package Overview
Dependencies
Maintainers
7
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbo.ls/init - npm Package Compare versions

Comparing version 2.10.31 to 2.10.41

31

index.js

@@ -6,3 +6,5 @@ 'use strict'

getActiveConfig,
getFontFaceString
getFontFaceString,
appendSVGSprite,
appendIconsSprite
} from '@symbo.ls/scratch'

@@ -19,3 +21,3 @@

const prepareInit = (config = CONFIG, RC_FILE) => {
const mergeWithLocalFile = (config = CONFIG, RC_FILE) => {
const rcfile = isObject(RC_FILE) ? RC_FILE : DYNAMIC_JSON || {}

@@ -28,7 +30,10 @@ return deepMerge(config, rcfile)

useVariable: true,
useReset: true
useReset: true,
useFontImport: true,
useIconSprite: true,
useSvgSprite: true
}
export const init = (config, RC_FILE, options = SET_OPTIONS) => {
const resultConfig = prepareInit(config, RC_FILE)
const resultConfig = mergeWithLocalFile(config, RC_FILE)
const emotion = options.emotion || defaultEmotion

@@ -39,3 +44,6 @@

useReset: options.useReset,
useFontImport: options.useFontImport,
useVariable: options.useVariable,
useSvgSprite: options.useSvgSprite,
useIconSprite: options.useIconSprite,
...resultConfig

@@ -48,7 +56,18 @@ }, { newConfig: options.newConfig })

const useVariable = conf.useVariable
const useFontImport = conf.useFontImport
const useSvgSprite = conf.useSvgSprite
const hasSvgs = config.svg || config.SVG
const useIconSprite = conf.useIconSprite
const hasIcons = config.icons || config.ICONS
emotion.injectGlobal(FontFace)
if (useFontImport) emotion.injectGlobal(FontFace)
if (useVariable) emotion.injectGlobal({ ':root': conf.CSS_VARS })
if (useReset) emotion.injectGlobal(conf.RESET)
if (hasSvgs) appendSVGSprite(hasSvgs, { document: options.document })
else if (useSvgSprite) appendSVGSprite(conf.SVG, { document: options.document })
if (hasIcons) appendIconsSprite(hasIcons, { document: options.document })
else if (useIconSprite) appendIconsSprite(conf.ICONS, { document: options.document })
return conf

@@ -58,3 +77,3 @@ }

export const updateReset = (config, RC_FILE, options = { emotion: defaultEmotion }) => {
const resultConfig = prepareInit(config, RC_FILE)
const resultConfig = mergeWithLocalFile(config, RC_FILE)
const conf = set({

@@ -61,0 +80,0 @@ verbose: false,

4

package.json
{
"name": "@symbo.ls/init",
"version": "2.10.31",
"version": "2.10.41",
"license": "MIT",
"gitHead": "828e14653b4f33040eaf9f42ba4adcc5111feb91",
"gitHead": "fe191d138564726ccb26fb5a6643c4d78709f0d3",
"source": "index.js",

@@ -7,0 +7,0 @@ "main": "index.js",

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