Skip to content

Commit

Permalink
Merge pull request #8 from engalar/engalar/issue1-2
Browse files Browse the repository at this point in the history
Engalar/issue1 2
  • Loading branch information
engalar authored Jul 25, 2022
2 parents 315c12f + 70bcd8f commit 4168e51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "graph",
"widgetName": "Graph",
"version": "1.1.5",
"version": "1.1.6",
"description": "My widget description",
"packagePath": "mendixcn",
"author": "wengao.liu@siemens.com",
Expand Down
5 changes: 2 additions & 3 deletions script/rename.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
var packageConfig = require('../package.json');
var { readXml, updateXml, replaceFile } = require('./xml');
var fs = require('fs');
var { join } = require('path');

console.log('rename: start');

replaceFile(`package.json`, /mendixcn.Graph.mpk/g, `mendixcn.${packageConfig.widgetName}.mpk`);

readXml("./src/package.xml", json => {
var oldWidgetName = json.package.clientModule[0].$.name;

Expand Down Expand Up @@ -54,7 +53,7 @@ readXml("./src/package.xml", json => {
})();
//#endregion

replaceFile(`../package.json`, /mendixcn.Graph.mpk/g, `mendixcn.${packageConfig.widgetName}.mpk`);
replaceFile(join(__dirname, '../package.json'), /mendixcn.Graph.mpk/g, `mendixcn.${packageConfig.widgetName}.mpk`);

console.log('rename: done');
//#endregion
Expand Down

0 comments on commit 4168e51

Please sign in to comment.