Martin Vladic
2 years ago
5 changed files with 41 additions and 3 deletions
After Width: | Height: | Size: 6.6 KiB |
@ -0,0 +1,4 @@ |
|||||||
|
{ |
||||||
|
"eez-framework-location": "eez", |
||||||
|
"eez-project-path": "lvgl-template-web.eez-project" |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
/** |
||||||
|
* @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; |
Loading…
Reference in new issue