@jtff/miztemplate-lib 3.0.0-rc12 → 3.0.0-rc13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/mizlib.js +25 -0
- package/package.json +1 -1
- package/scripts/inject-scripts.js +2 -0
package/lib/mizlib.js
CHANGED
|
@@ -397,6 +397,31 @@ class Mizlib {
|
|
|
397
397
|
let luaTable = 'return { \n' + await this.getMapResourceLuaStringFromZipObject(zip) + ' }';
|
|
398
398
|
return parse(luaTable).mapResource;
|
|
399
399
|
}
|
|
400
|
+
|
|
401
|
+
async generateConfigJsonFile(zip) {
|
|
402
|
+
let theatreString = (await this.getMissionObjectFromZipObject(zip)).theatre;
|
|
403
|
+
return {
|
|
404
|
+
"general": {
|
|
405
|
+
"missionFolder": "dist",
|
|
406
|
+
"missionPrefix": "Theatre",
|
|
407
|
+
"missionSuffix": "JTFF",
|
|
408
|
+
"missionVersion": "1.0.0-snapshot"
|
|
409
|
+
},
|
|
410
|
+
"google": {
|
|
411
|
+
"scopes": [
|
|
412
|
+
"https://www.googleapis.com/auth/drive"
|
|
413
|
+
],
|
|
414
|
+
"tokenPath": "dist/gtoken.json"
|
|
415
|
+
},
|
|
416
|
+
"missionTemplates": [
|
|
417
|
+
{
|
|
418
|
+
"theatre": theatreString,
|
|
419
|
+
"prefix": "template",
|
|
420
|
+
"destFolderId": "15CrplYJsmv8GNu2obuX-TuCWLrUff1NS"
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
};
|
|
424
|
+
}
|
|
400
425
|
}
|
|
401
426
|
|
|
402
427
|
module.exports = Mizlib
|
package/package.json
CHANGED
|
@@ -495,6 +495,8 @@ function injectScripts(jtffci, env_mission) {
|
|
|
495
495
|
destinationMizFilePath,
|
|
496
496
|
{ mapResource: mapResourceObject }
|
|
497
497
|
);
|
|
498
|
+
// generation des outils CI JTFF
|
|
499
|
+
fs.writeFileSync(workspacePath + 'config.json', await jtffci.mizlib.generateConfigJsonFile(mizObject));
|
|
498
500
|
console.log('...Done...');
|
|
499
501
|
return 0;
|
|
500
502
|
});
|