Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Nuxt's `build` and `start` command. Nuxt strips out the command from
// process.argv - so this will only work if a user does a `npm start`.
return
}
let outFile, outContent
const options = getOptions(this.options, moduleOptions)
const bulmaPath = getBulmaPath(options.rootDir)
const sassPaths = [join(bulmaPath, 'bulma.sass'), ...options.additionalPaths]
const license = '/*! bulma.io | MIT License | github.com/jgthms/bulma */'
if (existsSync(options.variablesPath)) {
sassPaths.unshift(options.variablesPath)
debug(
'Overwriting Bulma variables with',
ansi.yellow(options.variablesPath)
)
}
const sassContent = sassPaths
.map(v => v.replace(/\\/g, '\\\\')) // replace backslash by double backslash (needed for windows)
.map(v => `@import "${v}"`)
.join('\n')
if (options.disablePostCSSWarnings) {
merge(this.options.build, {
postcss: {
plugins: {
'postcss-custom-properties': {
warnings: false
}
}
outContent = new Purgecss({
content: options.srcGlobs,
css: [{ raw: css }],
whitelist: ['html', 'body', ...options.whitelist],
whitelistPatterns: options.whitelistPatterns,
whitelistPatternsChildren: options.whitelistPatternsChildren
}).purge()[0].css
if (!outContent.includes(license.substr(0, 12))) {
outContent = license + outContent
}
}
writeFileSync(outFile, outContent, 'utf8')
this.options.css.push(outFile)
debug('Wrote temporary file to', ansi.yellow(outFile))
}