lix-website/themes/lix/assets/bootstrap/node_modules/stylelint/lib/writeOutputFile.js

14 lines
336 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
'use strict';
const path = require('path');
const stripAnsi = require('strip-ansi');
const writeFileAtomic = require('write-file-atomic');
/**
* @param {string} content
* @param {string} filePath
* @returns {Promise<void>}
*/
module.exports = (content, filePath) =>
writeFileAtomic(path.normalize(filePath), stripAnsi(content));