svelte-preprocess
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "svelte-preprocess", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
# Svelte Preprocess | ||
> A magical and customizable [Svelte](https://svelte.technology) preprocessor with support for: PostCSS, SCSS, Less, Stylus, Coffeescript and Pug. | ||
> A customizable [Svelte](https://svelte.technology) preprocessor with support for: PostCSS, SCSS, Less, Stylus, Coffeescript and Pug. | ||
@@ -24,5 +24,5 @@ ## Installation | ||
const svelte = require('svelte') | ||
const magicalPreprocess = require('svelte-preprocess') | ||
const getSveltePreprocessor = require('svelte-preprocess') | ||
svelte.preprocess(input, magicalPreprocess()).then(...) | ||
svelte.preprocess(input, getSveltePreprocessor()).then(...) | ||
``` | ||
@@ -34,4 +34,4 @@ | ||
const svelte = require('svelte') | ||
const magicalPreprocess = require('svelte-preprocess') | ||
const magicOpts = { | ||
const getSveltePreprocessor = require('svelte-preprocess') | ||
const options = { | ||
/** Transform the whole markup before preprocessing */ | ||
@@ -52,3 +52,5 @@ onBefore(content, filename) { | ||
postcss: { | ||
plugins: require('autoprefixer')({ browsers: 'last 2 versions' }) | ||
plugins: [ | ||
require('autoprefixer')({ browsers: 'last 2 versions' }) | ||
] | ||
}, | ||
@@ -85,3 +87,3 @@ | ||
svelte.preprocess(input, magicalPreprocess(magicOpts)).then(...) | ||
svelte.preprocess(input, getSveltePreprocessor(options)).then(...) | ||
``` | ||
@@ -88,0 +90,0 @@ |
@@ -60,6 +60,3 @@ const stripIndent = require('strip-indent') | ||
if (isFn(onBefore)) { | ||
content = onBefore({ | ||
content, | ||
filename, | ||
}) | ||
content = onBefore(content, filename) | ||
} | ||
@@ -66,0 +63,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
149
0
12363
277