@multivisio/layout
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -10,19 +10,45 @@ { | ||
"margin-top": 30, | ||
"margin-bottom": 15 | ||
"margin-bottom": 15, | ||
"media": [ | ||
{ | ||
"down": "landscape", | ||
"font-size": 16, | ||
"line-height": 1.5, | ||
"font-weight": 700, | ||
"margin-top": 10, | ||
"margin-bottom": 10 | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "headline2", | ||
"font-size": 28, | ||
"font-size": 20, | ||
"line-height": 1.2, | ||
"font-weight": 400, | ||
"margin-top": 0, | ||
"margin-bottom": 15 | ||
"margin-bottom": 15, | ||
"media": [ | ||
{ | ||
"up": "portrait", | ||
"font-size": 28 | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "headline3", | ||
"font-size": 24, | ||
"font-size": 16, | ||
"line-height": 1.2, | ||
"font-weight": 400, | ||
"margin-top": 0, | ||
"margin-bottom": 15 | ||
"margin-bottom": 15, | ||
"media": [ | ||
{ | ||
"on": "portrait", | ||
"font-size": 18 | ||
}, | ||
{ | ||
"up": "landscape", | ||
"font-size": 20 | ||
} | ||
] | ||
}, | ||
@@ -144,3 +170,3 @@ { | ||
"row-gap": 15, | ||
"col-gap": 15 | ||
"column-gap": 15 | ||
}, | ||
@@ -147,0 +173,0 @@ "landscape": { |
{ | ||
"name": "@multivisio/layout", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -9,3 +9,10 @@ const { stat, statSync, writeFileSync } = require('node:fs'); | ||
for (let x = 0; x < values.length; x++) { | ||
r[values[x].name] = mapValues(values[x]); | ||
if (typeof values[x].name === "undefined") { | ||
if ( !Array.isArray( r ) ) { | ||
r = []; | ||
} | ||
r.push(mapValues(values[x])); | ||
} else { | ||
r[values[x].name] = mapValues(values[x]); | ||
} | ||
} | ||
@@ -38,3 +45,2 @@ } else if ( typeof values === "object" ) { | ||
} | ||
if (o.length) { | ||
@@ -76,3 +82,7 @@ r.push(`@use "@multivisio/layout/scss/typography";\n`); | ||
for ( const variables in values ) { | ||
v.push(`${' '.repeat( indent + 2)}${variables}: ${makeScssVariables(values[variables], ( indent + 2 ))}`) | ||
if (Array.isArray(values)) { | ||
v.push(`${' '.repeat( indent + 2)}var${variables}: ${makeScssVariables(values[variables], ( indent + 2 ))}`); | ||
} else { | ||
v.push(`${' '.repeat( indent + 2)}${variables}: ${makeScssVariables(values[variables], ( indent + 2 ))}`); | ||
} | ||
} | ||
@@ -90,3 +100,12 @@ r.push(v.join(`,\n`)); | ||
const jsonStats = statSync(`${layoutPath}/config.json`); | ||
const config = require(`${layoutPath}/config.json`); | ||
const configJson = require(`${layoutPath}/config.json`); | ||
const config = Object.assign( | ||
{ | ||
system: { | ||
environment: process.env.NODE_ENV | ||
} | ||
}, configJson | ||
); | ||
const map = {}; | ||
@@ -96,3 +115,3 @@ | ||
map[file] = {}; | ||
for ( const variable in config[file]) { | ||
for ( const variable in config[file] ) { | ||
map[file][variable] = mapValues(config[file][variable]); | ||
@@ -103,13 +122,15 @@ } | ||
let configOutput = []; | ||
for ( const file in map ) { | ||
const o = []; | ||
o.push(`@use "@multivisio/layout/scss/${file}/variables.scss" as ${file}Variables with (`); | ||
let v = []; | ||
for ( const variable in map[file]) { | ||
v.push(` $${variable}: ${makeScssVariables(map[file][variable])}`); | ||
['system','grid','colors','typography'].forEach( file => { | ||
if ( typeof map[file] !== "undefined" ) { | ||
const o = []; | ||
o.push(`@use "@multivisio/layout/scss/${file}/variables.scss" as ${file}Variables with (`); | ||
let v = []; | ||
for ( const variable in map[file]) { | ||
v.push(` $${variable}: ${makeScssVariables(map[file][variable])}`); | ||
} | ||
o.push(v.join(`,\n`)); | ||
o.push(');\n'); | ||
configOutput.push(o.join(`\n`)); | ||
} | ||
o.push(v.join(`,\n`)); | ||
o.push(');\n'); | ||
configOutput.push(o.join(`\n`)); | ||
} | ||
}) | ||
@@ -116,0 +137,0 @@ configOutput = configOutput.join(`\n`); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
77680
740
5