Fix PR feedback

This commit is contained in:
Jim LAURIE 2019-02-15 22:22:13 +01:00
parent c5d88ace8b
commit ab82eb1d2e
4 changed files with 20 additions and 16 deletions

View File

@ -12,7 +12,7 @@ const appPath = isDevelopmentMode ? path.resolve(process.env.PWD, '..') : path.r
shell.echo('🏗 Building the admin...'); shell.echo('🏗 Building the admin...');
shell.cd(path.resolve(appPath, 'admin')); shell.cd(path.resolve(appPath, 'admin'));
const build = shell.exec(`set APP_PATH="${appPath}" && npm run build`, {silent}); const build = shell.exec(`cross-env APP_PATH="${appPath}" npm run build`, {silent});
if (build.stderr && build.code !== 0) { if (build.stderr && build.code !== 0) {
console.error(build.stderr); console.error(build.stderr);
@ -55,7 +55,7 @@ if (process.env.npm_config_plugins === 'true') {
shell.echo('🏗 Building...'); shell.echo('🏗 Building...');
shell.cd(path.resolve(plugins, plugin)); shell.cd(path.resolve(plugins, plugin));
const build = shell.exec(`set APP_PATH="${appPath}" && npm run build`, {silent}); const build = shell.exec(`cross-env APP_PATH="${appPath}" npm run build`, {silent});
if (build.stderr && build.code !== 0) { if (build.stderr && build.code !== 0) {
console.error(build.stderr); console.error(build.stderr);

View File

@ -267,7 +267,7 @@ module.exports = (scope, cb) => {
if (answers.authenticationDatabase) { if (answers.authenticationDatabase) {
scope.database.options.authenticationDatabase = answers.authenticationDatabase; scope.database.options.authenticationDatabase = answers.authenticationDatabase;
} }
// SQLite requirements. // SQLite requirements.
if (isSQLite) { if (isSQLite) {
// Necessary for SQLite configuration (https://knexjs.org/#Builder-insert). // Necessary for SQLite configuration (https://knexjs.org/#Builder-insert).
@ -283,7 +283,11 @@ module.exports = (scope, cb) => {
} }
console.log(); console.log();
console.log(isQuick ? '✅ Connected to the database' : '⏳ Testing database connection...'); console.log(
isQuick
? '✅ Connected to the database'
: '⏳ Testing database connection...\r\nIt might take a minute, please have a coffee ☕️'
);
resolve(); resolve();
}), }),
@ -347,11 +351,11 @@ module.exports = (scope, cb) => {
const connectedToTheDatabase = (withMessage = true) => { const connectedToTheDatabase = (withMessage = true) => {
console.log(); console.log();
if (withMessage) { if (withMessage) {
console.log(`The app has been connected to the database ${green('successfully')}!`); console.log(`The app has been connected to the database ${green('successfully')}!`);
console.log(); console.log();
} }
trackSuccess('didConnectDatabase', scope); trackSuccess('didConnectDatabase', scope);
cb.success(); cb.success();

View File

@ -33,6 +33,10 @@
"pluralize": "^7.0.0", "pluralize": "^7.0.0",
"strapi-utils": "3.0.0-alpha.23.1" "strapi-utils": "3.0.0-alpha.23.1"
}, },
"devDependencies": {
"cross-env": "^5.2.0",
"rimraf": "^2.6.3"
},
"author": { "author": {
"name": "A Strapi developer", "name": "A Strapi developer",
"email": "", "email": "",
@ -49,9 +53,5 @@
"node": ">= 10.0.0", "node": ">= 10.0.0",
"npm": ">= 6.0.0" "npm": ">= 6.0.0"
}, },
"license": "MIT", "license": "MIT"
"devDependencies": {
"cross-env": "^5.2.0",
"rimraf": "^2.6.3"
}
} }

View File

@ -31,7 +31,7 @@ const packageJSON = require('../package.json');
*/ */
module.exports = function (name, cliArguments) { module.exports = function (name, cliArguments) {
console.log('🚀 Start creating your Strapi application. It might take a minute, please take a coffee ☕️'); console.log('🚀 Start creating your Strapi application.');
const developerMode = cliArguments.dev !== undefined; const developerMode = cliArguments.dev !== undefined;
@ -85,9 +85,9 @@ module.exports = function (name, cliArguments) {
const error = (error) => { const error = (error) => {
fetch('https://analytics.strapi.io/track', { fetch('https://analytics.strapi.io/track', {
method: 'POST', method: 'POST',
body: JSON.stringify({ body: JSON.stringify({
event: 'didNotStartAutomatically', event: 'didNotStartAutomatically',
deviceId: machineIdSync(), deviceId: machineIdSync(),
properties: { properties: {
error, error,
os: os.type() os: os.type()
@ -122,7 +122,7 @@ module.exports = function (name, cliArguments) {
input: process.stdin, input: process.stdin,
output: process.stdout output: process.stdout
}); });
rl.on("SIGINT", function () { rl.on("SIGINT", function () {
process.emit("SIGINT"); process.emit("SIGINT");
}); });