@cosmicjs/blocks
Advanced tools
Comparing version 0.0.81 to 0.0.82
10
index.js
@@ -115,10 +115,8 @@ #!/usr/bin/env node | ||
const endTime = performance.now() | ||
const speed = ((endTime - startTime) / 1000).toFixed(2) | ||
console.log( | ||
chalk.greenBright( | ||
`ϟ Executed superfast in ${((endTime - startTime) / 1000).toFixed( | ||
2 | ||
)} seconds!` | ||
if (speed < 10) | ||
console.log( | ||
chalk.greenBright(`ϟ Executed superfast in ${speed} seconds!`) | ||
) | ||
) | ||
@@ -125,0 +123,0 @@ console.log( |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.0.81", | ||
"version": "0.0.82", | ||
"description": "Cosmic blocks setup", | ||
@@ -10,0 +10,0 @@ "main": "index.js", |
@@ -176,8 +176,2 @@ import fs from "fs" | ||
updateTailwindConfig(tailwindConfigTSPath, cosmicTailwindPath) | ||
} else { | ||
console.log( | ||
chalk.red( | ||
"✗ Error locating tailwind config file. Please add cosmic folder to your content path manually." | ||
) | ||
) | ||
} | ||
@@ -189,8 +183,9 @@ } | ||
const regex = /content:\s*\[["'].*["']\]/g | ||
const regex = /content:\s*\[\s*[\s\S]*?\s*\]/g | ||
const match = content.match(regex) | ||
if (match.length > 0) { | ||
if (match?.length > 0) { | ||
let arrayString = match[0].replace("content: ", "") | ||
arrayString = arrayString.replace(/'/g, '"') | ||
arrayString = arrayString.replace(/'/g, '"').replace(/,(?=[^,]*$)/, "") | ||
let parsedArray = JSON.parse(arrayString) | ||
@@ -214,2 +209,8 @@ const hasCosmicPath = parsedArray.includes(cosmicPath) | ||
} | ||
} else { | ||
console.log( | ||
chalk.red( | ||
"✗ Error locating tailwind config file. Please add cosmic folder to your content path manually." | ||
) | ||
) | ||
} | ||
@@ -216,0 +217,0 @@ } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
124233
1
1949