@strapi/generate-new
Advanced tools
Comparing version 4.0.0-beta.14 to 4.0.0-beta.15
@@ -159,3 +159,5 @@ 'use strict'; | ||
console.log(` ${cmd} develop`); | ||
console.log(' Start Strapi in watch mode.'); | ||
console.log( | ||
' Start Strapi in watch mode. (Changes in Strapi project files will trigger a server restart)' | ||
); | ||
console.log(); | ||
@@ -162,0 +164,0 @@ console.log(` ${cmd} start`); |
@@ -7,8 +7,4 @@ 'use strict'; | ||
// Node.js core. | ||
const chalk = require('chalk'); | ||
const fse = require('fs-extra'); | ||
const { trackUsage } = require('./utils/usage'); | ||
const stopProcess = require('./utils/stop-process'); | ||
const checkInstallPath = require('./utils/check-install-path'); | ||
const createCLIDatabaseProject = require('./create-cli-db-project'); | ||
@@ -22,23 +18,4 @@ const createCustomizeProject = require('./create-customized-project'); | ||
// check rootPath is empty | ||
if (await fse.pathExists(scope.rootPath)) { | ||
const stat = await fse.stat(scope.rootPath); | ||
checkInstallPath(scope.rootPath); | ||
if (!stat.isDirectory()) { | ||
stopProcess( | ||
`⛔️ ${chalk.green( | ||
scope.rootPath | ||
)} is not a directory. Make sure to create a Strapi application in an empty directory.` | ||
); | ||
} | ||
const files = await fse.readdir(scope.rootPath); | ||
if (files.length > 1) { | ||
stopProcess( | ||
`⛔️ You can only create a Strapi app in an empty directory.\nMake sure ${chalk.green( | ||
scope.rootPath | ||
)} is empty.` | ||
); | ||
} | ||
} | ||
await trackUsage({ event: 'willCreateProject', scope }); | ||
@@ -45,0 +22,0 @@ |
@@ -16,2 +16,3 @@ 'use strict'; | ||
const generateNew = require('./generate-new'); | ||
const checkInstallPath = require('./utils/check-install-path'); | ||
@@ -22,3 +23,3 @@ sentry.init({ | ||
module.exports = (projectDirectory, cliArguments) => { | ||
const generateNewApp = (projectDirectory, cliArguments) => { | ||
checkRequirements(); | ||
@@ -106,1 +107,6 @@ | ||
} | ||
module.exports = { | ||
generateNewApp, | ||
checkInstallPath, | ||
}; |
@@ -37,3 +37,3 @@ 'use strict'; | ||
} catch (error) { | ||
throw new Error(`Could not find package ${chalk.green('template.json')} on npm`); | ||
throw new Error(`Could not find package ${chalk.yellow(template)} on npm`); | ||
} | ||
@@ -40,0 +40,0 @@ } |
{ | ||
"name": "@strapi/generate-new", | ||
"version": "4.0.0-beta.14", | ||
"version": "4.0.0-beta.15", | ||
"description": "Generate a new Strapi application.", | ||
@@ -55,3 +55,3 @@ "homepage": "https://strapi.io", | ||
"license": "SEE LICENSE IN LICENSE", | ||
"gitHead": "0c0789354d34c685b94474911b79c1b679155dfa" | ||
"gitHead": "c69713bf7f437a7cee66ffdeed95227d6246a872" | ||
} |
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
47187
44
1116