create-wdio
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -79,10 +79,12 @@ "use strict"; | ||
await (0, utils_1.runProgram)('npx', ['wdio', 'config', ...(useYarn ? ['--yarn'] : []), ...(opts.yes ? ['--yes'] : [])]); | ||
console.log('Adding scripts to package.json'); | ||
const isUsingTypescript = await (0, utils_1.exists)('wdio.conf.ts'); | ||
const pkgJson = require(pkgJsonPath); | ||
if (!pkgJson.scripts) { | ||
pkgJson.scripts = {}; | ||
if (await (0, utils_1.exists)(pkgJsonPath)) { | ||
console.log('Adding scripts to package.json'); | ||
const pkgJson = require(pkgJsonPath); | ||
const isUsingTypescript = await (0, utils_1.exists)('wdio.conf.ts'); | ||
if (!pkgJson.scripts) { | ||
pkgJson.scripts = {}; | ||
} | ||
pkgJson.scripts['wdio'] = `wdio run wdio.conf.${isUsingTypescript ? 'ts' : 'js'}`; | ||
await fs_1.default.promises.writeFile(pkgJsonPath, JSON.stringify(pkgJson, null, 4)); | ||
} | ||
pkgJson.scripts['wdio'] = `wdio run wdio.conf.${isUsingTypescript ? 'ts' : 'js'}`; | ||
await fs_1.default.promises.writeFile(pkgJsonPath, JSON.stringify(pkgJson, null, 4)); | ||
console.log(`\n🤖 Successfully setup project at ${root} 🎉`); | ||
@@ -89,0 +91,0 @@ if (root != ewd) { |
{ | ||
"name": "create-wdio", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "Install WebdriverIO with all its dependencies in a single run", | ||
@@ -5,0 +5,0 @@ "author": "Christian Bromann <christian@saucelabs.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18264
259