ui5_easy_use
Version:
A utility package for UI5 projects
16 lines (11 loc) • 634 B
JavaScript
const fs = require('fs');
const path = require('path');
const projectPackageJsonPath = path.resolve(process.cwd(), 'package.json');
const packageJson = require(projectPackageJsonPath);
// Add your custom script
packageJson.scripts = packageJson.scripts || {};
packageJson.scripts['c-mvc'] = "node node_modules/ui5_easy_use/create_auto_files/main.js";
packageJson.scripts['ez5'] = "node node_modules/ui5_easy_use/index.js";
// Write the updated package.json back to the project
fs.writeFileSync(projectPackageJsonPath, JSON.stringify(packageJson, null, 2));
console.log('ez5 script has been added to package.json');