lib/utils.js
function hasVariableResources (assetsDirectory) {
  const files = require('fs-extra').readdirSync(assetsDirectory)
  const hasScale = files.find(file => /\.scale-...\./g.test(file))

  return (!!hasScale)
}
function hasVariableResources (assetsDirectory) {
  const files = require('fs-extra').readdirSync(assetsDirectory)
  const hasScale = files.find(file => /\.scale-...\./g.test(file))

  return (!!hasScale)
}
function hasVariableResources ( assetsDirectory ) { const files = require ( 'fs-extra' ) . readdirSync ( assetsDirectory ) const hasScale = files . find ( file => / \.scale-...\. / g . test ( file ) ) return ( ! ! hasScale ) }
Makes an educated guess whether or not resources have
multiple variations or resource versions for
language, scale, contrast, etc

@param assetsDirectory - Path to a the assets directory
@returns {boolean} - Are the assets variable?
Makes an educated guess whether or not resources have multiple variations or resource versions for language scale contrast etc