Skip to content

Commit

Permalink
Fix typos in doc node-sass example
Browse files Browse the repository at this point in the history
closes #2337
  • Loading branch information
cvlab authored and Conduitry committed Apr 2, 2019
1 parent a68abb8 commit b161725
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions site/content/docs/04-compile-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@ If a `dependencies` array is returned, it will be included in the result object.
```js
const svelte = require('svelte/compiler');
const sass = require('node-sass');
const { dirname } = require('path');

const { code, dependencies } = svelte.preprocess(source, {
style: ({ content, attributes, filename }) => {
style: async ({ content, attributes, filename }) => {
// only process <style lang="sass">
if (attributes.lang !== 'sass') return;

Expand All @@ -228,7 +229,7 @@ const { code, dependencies } = svelte.preprocess(source, {
includePaths: [
dirname(filename),
],
}), (err, result) => {
}, (err, result) => {
if (err) reject(err);
else resolve(result);
}));
Expand Down

0 comments on commit b161725

Please sign in to comment.