create-kendoreact-app
Advanced tools
Comparing version 0.0.2-beta.7 to 0.0.2-beta.9
const p = require('path'); | ||
const chalk = require('chalk'); | ||
const fg = require('fast-glob'); | ||
@@ -7,2 +8,3 @@ const fs = require('fs'); | ||
const minimist = require('minimist'); | ||
const program = require('./package.json'); | ||
@@ -41,27 +43,30 @@ const applyKendoReact = (str) => str.replace('create-react-app', 'create-kendoreact-app'); | ||
if (argv.help || argv.h || argv.version || argv.V || argv.info) { | ||
spawnSync(require.resolve('create-react-app'), args, { stdio: 'inherit' }); | ||
const result = spawnSync(require.resolve('create-react-app'), args); | ||
console.log(applyKendoReact(result.stdout.toString())); | ||
} else { | ||
inquirer | ||
.prompt([ | ||
!argvProjectName && { | ||
name: 'projectName', | ||
message: 'What is the name of your project?', | ||
}, | ||
!argv.typescript && { | ||
name: 'typescript', | ||
message: 'Do you want to use TypeScript?', | ||
type: 'confirm', | ||
}, | ||
!argv.sass && { | ||
name: 'sass', | ||
message: 'Do you want to use SASS?', | ||
type: 'confirm', | ||
}, | ||
!argv.theme && { | ||
name: 'theme', | ||
message: 'Which Kendo UI Theme do you want to use?', | ||
type: 'list', | ||
choices: ['default', 'bootstrap', 'material'], | ||
}, | ||
].filter(Boolean)) | ||
.prompt( | ||
[ | ||
!argvProjectName && { | ||
name: 'projectName', | ||
message: 'What is the name of your project?', | ||
}, | ||
!argv.typescript && { | ||
name: 'typescript', | ||
message: 'Do you want to use TypeScript?', | ||
type: 'confirm', | ||
}, | ||
!argv.sass && { | ||
name: 'sass', | ||
message: 'Do you want to use SASS?', | ||
type: 'confirm', | ||
}, | ||
!argv.theme && { | ||
name: 'theme', | ||
message: 'Which Kendo UI Theme do you want to use?', | ||
type: 'list', | ||
choices: ['default', 'bootstrap', 'material'], | ||
}, | ||
].filter(Boolean) | ||
) | ||
.then((answers) => { | ||
@@ -76,8 +81,22 @@ const preprocessor = answers.sass || argv.sass ? '-sass' : ''; | ||
spawnSync(require.resolve('create-react-app'), [answers.projectName || argvProjectName, ...args, ...template], { | ||
stdio: 'inherit', | ||
}); | ||
const projectName = answers.projectName || argvProjectName; | ||
if (projectName) { | ||
spawnSync(require.resolve('create-react-app'), [projectName, ...args, ...template], { | ||
stdio: 'inherit', | ||
}); | ||
if (answers.theme !== 'default') { | ||
overrideTheme(answers.projectName || argvProjectName, answers.theme || argv.theme); | ||
if (answers.theme !== 'default') { | ||
overrideTheme(projectName, answers.theme || argv.theme); | ||
} | ||
} else { | ||
console.log(); | ||
console.error('Please specify the project directory:'); | ||
console.log(` ${chalk.cyan(program.name)} ${chalk.green('<project-directory>')}`); | ||
console.log(); | ||
console.log('For example:'); | ||
console.log(` ${chalk.cyan(program.name)} ${chalk.green('my-react-app')}`); | ||
console.log(); | ||
console.log(`Run ${chalk.cyan(`${program.name} --help`)} to see all options.`); | ||
console.log(); | ||
process.exit(1); | ||
} | ||
@@ -84,0 +103,0 @@ }); |
{ | ||
"name": "create-kendoreact-app", | ||
"version": "0.0.2-beta.7+ff192a3", | ||
"version": "0.0.2-beta.9+fe4082e", | ||
"bin": "./index.js", | ||
@@ -14,9 +14,10 @@ "files": [ | ||
"devDependencies": { | ||
"cra-template-kendo": "0.0.2-beta.7+ff192a3", | ||
"cra-template-kendo-sass": "0.0.2-beta.7+ff192a3", | ||
"cra-template-kendo-typescript": "0.0.2-beta.7+ff192a3", | ||
"cra-template-kendo-typescript-sass": "0.0.2-beta.7+ff192a3", | ||
"cra-template-kendo": "0.0.2-beta.9+fe4082e", | ||
"cra-template-kendo-sass": "0.0.2-beta.9+fe4082e", | ||
"cra-template-kendo-typescript": "0.0.2-beta.9+fe4082e", | ||
"cra-template-kendo-typescript-sass": "0.0.2-beta.9+fe4082e", | ||
"create-react-app": "^5" | ||
}, | ||
"dependencies": { | ||
"chalk": "^4.1.2", | ||
"fast-glob": "^3.2.11", | ||
@@ -29,3 +30,3 @@ "inquirer": "^8.2.2", | ||
}, | ||
"gitHead": "ff192a32b398725665280e6ed15f257bacb97e43" | ||
"gitHead": "fe4082e5b6b6fcd654a7685faea72144d1006193" | ||
} |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
5716
113
4
+ Addedchalk@^4.1.2