Fix typos in doc node-sass example

closes #2337
pull/2360/head
Vadim Cebaniuc 6 years ago committed by Conduitry
parent a68abb8a9a
commit b161725a51

@ -216,9 +216,10 @@ If a `dependencies` array is returned, it will be included in the result object.
```js ```js
const svelte = require('svelte/compiler'); const svelte = require('svelte/compiler');
const sass = require('node-sass'); const sass = require('node-sass');
const { dirname } = require('path');
const { code, dependencies } = svelte.preprocess(source, { const { code, dependencies } = svelte.preprocess(source, {
style: ({ content, attributes, filename }) => { style: async ({ content, attributes, filename }) => {
// only process <style lang="sass"> // only process <style lang="sass">
if (attributes.lang !== 'sass') return; if (attributes.lang !== 'sass') return;
@ -228,7 +229,7 @@ const { code, dependencies } = svelte.preprocess(source, {
includePaths: [ includePaths: [
dirname(filename), dirname(filename),
], ],
}), (err, result) => { }, (err, result) => {
if (err) reject(err); if (err) reject(err);
else resolve(result); else resolve(result);
})); }));

Loading…
Cancel
Save