|
|
|
@ -6,8 +6,7 @@ const { technologies, categories } = JSON.parse(
|
|
|
|
|
fs.readFileSync('./src/technologies.json')
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Object.keys(technologies).forEach((name) => {
|
|
|
|
|
Object.keys(technologies).forEach((name) => {
|
|
|
|
|
const technology = technologies[name]
|
|
|
|
|
|
|
|
|
|
// Validate regular expressions
|
|
|
|
@ -21,9 +20,7 @@ try {
|
|
|
|
|
: technology[type]
|
|
|
|
|
|
|
|
|
|
Object.keys(keyed).forEach((key) => {
|
|
|
|
|
const patterns = Array.isArray(keyed[key])
|
|
|
|
|
? keyed[key]
|
|
|
|
|
: [keyed[key]]
|
|
|
|
|
const patterns = Array.isArray(keyed[key]) ? keyed[key] : [keyed[key]]
|
|
|
|
|
|
|
|
|
|
patterns.forEach((pattern, index) => {
|
|
|
|
|
const id = `${name}: ${type}[${key === '_' ? `${index}` : key}]`
|
|
|
|
@ -154,10 +151,10 @@ try {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// Validate icons
|
|
|
|
|
fs.readdirSync(iconPath).forEach((file) => {
|
|
|
|
|
// Validate icons
|
|
|
|
|
fs.readdirSync(iconPath).forEach((file) => {
|
|
|
|
|
const filePath = `${iconPath}/${file}`
|
|
|
|
|
|
|
|
|
|
if (fs.statSync(filePath).isFile() && !file.startsWith('.')) {
|
|
|
|
@ -172,8 +169,4 @@ try {
|
|
|
|
|
throw new Error(`Extraneous file: ${filePath}}`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} catch (error) {
|
|
|
|
|
// eslint-disable-next-line no-console
|
|
|
|
|
console.error(error.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|