diff --git a/generators/app/index.js b/generators/app/index.js index 8e0fe70..83e8236 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -203,7 +203,7 @@ export default class extends Generator { packge.scripts["deploy"] = "run-s build:ui"; } var sPackageJsonPath = this.destinationPath("package.json"); - console.info("Package Path : "+ sPackageJsonPath); + // console.info("Package Path : "+ sPackageJsonPath); this.fs.extendJSON(sPackageJsonPath, packge); //await writeJSON.call(this,sPackageJsonPath , packge); } diff --git a/generators/newwebapp/index.js b/generators/newwebapp/index.js index 63f647a..0cc4bce 100644 --- a/generators/newwebapp/index.js +++ b/generators/newwebapp/index.js @@ -69,7 +69,7 @@ export default class extends Generator { // Append to Main package.json var sPackageJsonPath = this.destinationPath("package.json"); - console.info("Package Path : "+ sPackageJsonPath); + this.fs.extendJSON( sPackageJsonPath, function (packge) { packge.scripts["serve:" + sModuleName] = "ui5 serve --config=" + sModuleName + "/ui5.yaml"; packge.scripts["build:ui"] += " build:" + sModuleName; diff --git a/package.json b/package.json index 337b9a3..f27f6fb 100644 --- a/package.json +++ b/package.json @@ -31,24 +31,24 @@ "generators" ], "dependencies": { + "chalk": "^5.3.0", "glob": "^11.0.0", "object-assign-deep": "^0.4.0", "package-json": "^10.0.1", + "path": "^0.12.7", + "semver": "^7.6.3", "valid-filename": "^3.1.0", - "chalk": "^5.3.0", - "path": "^0.12.7", - "yaml": "^2.3.4", - "yeoman-environment": "^4.1.3", - "yeoman-generator": "^7.1.1", - "yosay": "^2.0.2", - "semver": "^7.6.3" + "yaml": "^2.3.4", + "yeoman-environment": "^4.1.3", + "yeoman-generator": "^7.1.1", + "yosay": "^2.0.2" }, "devDependencies": { "execa": "^5.0.0", "mocha": "^10.4.0", "prettier": "2.2.1", "yeoman-assert": "^3.1.1", - "yeoman-test": "^8.3.0", - "yo": "^5.0.0" + "yeoman-test": "^8.3.0", + "yo": "^5.0.0" } } diff --git a/test/basic.js b/test/basic.js index 2d2343f..e6767e2 100644 --- a/test/basic.js +++ b/test/basic.js @@ -1,12 +1,18 @@ -const assert = require("yeoman-assert"); -const path = require("path"); -const helpers = require("yeoman-test"); -const execa = require("execa"); +import assert from "yeoman-assert"; +import path, { dirname } from "path"; +import helpers, { result } from "yeoman-test"; +import execa from "execa"; +import { fileURLToPath } from "url" +//const assert = require("yeoman-assert"); +//const path = require("path"); +//const helpers = require("yeoman-test"); +//const execa = require("execa"); const IsCIRun = process.env.CI; function createTest(oPrompt) { describe(Object.values(oPrompt).join("-"), function () { + const __dirname = dirname(fileURLToPath(import.meta.url)) this.timeout(200000); it("should be able to create the project", function () {