UNPKG

create-aiot

Version:

An easy way to start aiot project

27 lines (26 loc) 671 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _sharedUtils = require("@aiot-toolkit/shared-utils"); class Common { /** * 遍历项目文件,替换词语 * @param keywords * @param projectAbsolutePath */ static performReplace(keywords, projectAbsolutePath) { const { data, includes } = keywords; const files = _sharedUtils.FileUtil.readAlldirSync(projectAbsolutePath, includes); if (files && files.length) { files.forEach(item => { _sharedUtils.FileUtil.replaceFileContent(item, data); }); } } } var _default = exports.default = Common;