mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
d891159950
Also, add missing `'use strict'` statements; these aren't real modules.
16 lines
399 B
JavaScript
16 lines
399 B
JavaScript
/* eslint-env node */
|
|
|
|
'use strict'
|
|
|
|
const path = require('node:path')
|
|
const runnerPath = path.join(__dirname, 'runner').replace(/\\/g, '/')
|
|
|
|
require.extensions['.scss'] = (module, filename) => {
|
|
const normalizedFilename = filename.replace(/\\/g, '/')
|
|
|
|
return module._compile(`
|
|
const runner = require('${runnerPath}')
|
|
runner('${normalizedFilename}', { describe, it })
|
|
`, filename)
|
|
}
|