create-salt-project
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "create-salt-project", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -23,3 +23,5 @@ import { execCommand, execCommandOnProject, execWriteFile, log, spinner, } from "../utils.js"; | ||
await execCommandOnProject(this.answers)(`ng generate config karma`); | ||
const packageJson = require(this.answers.CWD + "/package.json"); | ||
const packageJson = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
packageJson.scripts = { | ||
@@ -26,0 +28,0 @@ ...packageJson.scripts, |
@@ -334,3 +334,5 @@ import { log } from "console"; | ||
await execWriteFile(this.answers, ".lintstagedrc.js", this.lintStagedConfiguration); | ||
const packageJson = require(this.answers.CWD + "/package.json"); | ||
const packageJson = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
packageJson.scripts.lint = "eslint ."; | ||
@@ -346,3 +348,5 @@ packageJson.scripts.lintfix = "eslint . --fix"; | ||
await execWriteFile(this.answers, ".prettierrc.json", JSON.stringify(this.formatterConfiguration)); | ||
const packageJson = require(this.answers.CWD + "/package.json"); | ||
const packageJson = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
packageJson.scripts.format = | ||
@@ -371,3 +375,5 @@ 'prettier --write "./**/*.{js,jsx,ts,tsx,css,scss,md,json}" .'; | ||
await execCommandOnProject(this.answers)(this.commandsInstallPrecommitLiteral[this.answers.packageManager]); | ||
let packageJsonObject = require(this.answers.CWD + "/package.json"); | ||
let packageJsonObject = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
if (this.answers.packageManager === "yarn") { | ||
@@ -383,3 +389,5 @@ this.createPostinstallScript(packageJsonObject); | ||
await execWriteFile(this.answers, ".husky/pre-commit", commitMessage); | ||
packageJsonObject = require(this.answers.CWD + "/package.json"); | ||
packageJsonObject = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
await this.createSaltPrecommit(this.answers, packageJsonObject); | ||
@@ -386,0 +394,0 @@ await execWriteFile(this.answers, "package.json", JSON.stringify(packageJsonObject)); |
@@ -107,3 +107,5 @@ import { execCommand, execCommandOnProject, execWriteFile, log, spinner, } from "../utils.js"; | ||
await execWriteFile(this.answers, "jest.setup.ts", this.jestSetupString); | ||
const packageJson = require(this.answers.CWD + "/package.json"); | ||
const packageJson = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
packageJson.scripts = { | ||
@@ -110,0 +112,0 @@ ...packageJson.scripts, |
@@ -36,5 +36,5 @@ import { exec } from "child_process"; | ||
export const execWriteFile = async (answer, fileName, value) => { | ||
await writeFileSync(`${answer.CWD}/${fileName}`, value, { | ||
await writeFileSync(`${answer.CWD}/${answer.projectName}/${fileName}`, value, { | ||
encoding: "utf-8", | ||
}); | ||
}; |
{ | ||
"name": "create-salt-project", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -56,3 +56,5 @@ import { TAnswers } from "../types.js"; | ||
const packageJson = require(this.answers.CWD + "/package.json"); | ||
const packageJson = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
@@ -59,0 +61,0 @@ packageJson.scripts = { |
@@ -429,3 +429,5 @@ import { log } from "console"; | ||
const packageJson = require(this.answers.CWD + "/package.json"); | ||
const packageJson = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
@@ -476,3 +478,5 @@ packageJson.scripts.lint = "eslint ."; | ||
const packageJson = require(this.answers.CWD + "/package.json"); | ||
const packageJson = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
@@ -558,3 +562,5 @@ packageJson.scripts.format = | ||
let packageJsonObject = require(this.answers.CWD + "/package.json"); | ||
let packageJsonObject = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
@@ -593,3 +599,5 @@ if (this.answers.packageManager === "yarn") { | ||
packageJsonObject = require(this.answers.CWD + "/package.json"); | ||
packageJsonObject = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
@@ -596,0 +604,0 @@ await this.createSaltPrecommit(this.answers, packageJsonObject); |
@@ -205,3 +205,5 @@ import { TAnswers } from "../types.js"; | ||
const packageJson = require(this.answers.CWD + "/package.json"); | ||
const packageJson = require(this.answers.CWD + | ||
this.answers.projectName + | ||
"/package.json"); | ||
@@ -208,0 +210,0 @@ packageJson.scripts = { |
@@ -51,5 +51,9 @@ import { exec } from "child_process"; | ||
) => { | ||
await writeFileSync(`${answer.CWD}/${fileName}`, value, { | ||
encoding: "utf-8", | ||
}); | ||
await writeFileSync( | ||
`${answer.CWD}/${answer.projectName}/${fileName}`, | ||
value, | ||
{ | ||
encoding: "utf-8", | ||
} | ||
); | ||
}; |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
57469
1537