Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-preprocess

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-preprocess - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

2

package.json
{
"name": "svelte-preprocess",
"version": "2.2.0",
"version": "2.2.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -16,6 +16,12 @@ const postcss = require('postcss')

/** Adapted from https://github.com/TehShrike/svelte-preprocess-postcss */
module.exports = ({ content, filename, options = {}, map = false }) => {
return postcssLoadConfig(options, options.configFilePath)
.then(options => process(options.plugins || [], content, filename, map))
.catch(e => process(options.plugins || [], content, filename, map))
module.exports = ({ content, filename, options = {}, map = undefined }) => {
console.log({ content, map })
/** If manually passed a plugins array, use it as the postcss config */
return typeof options.plugins !== 'undefined'
? process(options.plugins || [], content, filename, map)
: /** If not, look for a postcss config file */
postcssLoadConfig(options, options.configFilePath)
.then(options => process(options.plugins || [], content, filename, map))
/** No config object passed and no config file found, do nothing */
.catch(e => ({ code: content, map }))
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc