Template for LVGL web simulator project with EEZ Studio
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
985 B

/**
* @callback RenameFile
* @param {string} fileSrcRelativePath
* @param {string} fileDstRelativePath
* @returns {Promise<void>}
*/
/**
* @callback ReplaceInFile
* @param {string} fileRelativePath
* @param {string} searchValue
* @param {string} newValue
* @returns {Promise<void>}
*/
/**
* @typedef {Object} WizardContext
* @property {string} projectDirPath
* @property {string} projectName
* @property {RenameFile} renameFile
* @property {ReplaceInFile} replaceInFile
*/
/**
* @param {WizardContext} context
*/
async function postProcessing(context) {
await context.replaceInFile("CMakeLists.txt", "lvgl-template-web", context.projectName);
await context.replaceInFile("README.md", "{{projectDirPath}}", context.projectDirPath);
await context.replaceInFile("README.md", "{{projectName}}", context.projectName);
await context.renameFile("lvgl-template-web.eez-project", context.projectName + ".eez-project");
}
module.exports = postProcessing;