'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var fs_fs = require('../fs/fs.js');
var rem_rem = require('../rem/rem.js');
require('../nodejs/crypto.js');
require('../nodejs/fs.js');
require('../nodejs/os.js');

/**
 * 替换文件的 rem 单位，转为 px
 * @param {string} filePath 文件路径
 * @example
 * ```ts
 * remToPxInFile('xxx.vue');
 * ```
 */
function remToPxInFile(filePath) {
  var data = fs_fs.readFileSync(filePath);
  var newData = rem_rem.transFormRem(data, 50, 'px');
  fs_fs.writeFileSync(filePath, newData);
}

exports.remToPxInFile = remToPxInFile;
