Skip to content

Commit

Permalink
Merge pull request #44 from bratteng/feature/use-dart-sass
Browse files Browse the repository at this point in the history
Replace node-sass with sass (dart-sass)
  • Loading branch information
electerious committed Nov 28, 2020
2 parents 8cb6a3c + 85805ae commit e563856
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -33,8 +33,8 @@
"dependencies": {
"autoprefixer": "^9.4.8",
"cssnano": "^4.1.10",
"node-sass": "^4.11.0",
"postcss": "^7.0.14"
"postcss": "^7.0.14",
"sass": "^1.29.0"
},
"devDependencies": {
"chai": "^4.2.0",
Expand Down
7 changes: 3 additions & 4 deletions src/sass.js
@@ -1,7 +1,6 @@
'use strict'

const util = require('util')
const sass = require('node-sass')
const sass = require('sass')

/**
* Transform SASS to CSS.
Expand All @@ -19,10 +18,10 @@ module.exports = async function(folderPath, str, opts) {
// Dismiss sourceMap when output should be optimized
const sourceMap = opts.optimize !== true

const result = await util.promisify(sass.render)({
const result = sass.renderSync({
data: str,
includePaths: [ folderPath ],
sourceMap: sourceMap,
sourceMap: sourceMap ? '' : false,
sourceMapEmbed: sourceMap,
sourceMapContents: sourceMap
})
Expand Down

0 comments on commit e563856

Please sign in to comment.