blob: bef870ac6b1383450a178428c59432026b9db940 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
'use strict'
const fs = require('node:fs')
const path = require('node:path')
const { runSass } = require('sass-true')
module.exports = (filename, { describe, it }) => {
const data = fs.readFileSync(filename, 'utf8')
const TRUE_SETUP = '$true-terminal-output: false; @import "true";'
const sassString = TRUE_SETUP + data
runSass(
{ describe, it, sourceType: 'string' },
sassString,
{ loadPaths: [path.dirname(filename)] }
)
}
|