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.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) {
console.error(build.stderr);
@ -55,7 +55,7 @@ if (process.env.npm_config_plugins === 'true') {
shell.echo('🏗 Building...');
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) {
console.error(build.stderr);

View File

@ -267,7 +267,7 @@ module.exports = (scope, cb) => {
if (answers.authenticationDatabase) {
scope.database.options.authenticationDatabase = answers.authenticationDatabase;
}
// SQLite requirements.
if (isSQLite) {
// Necessary for SQLite configuration (https://knexjs.org/#Builder-insert).
@ -283,7 +283,11 @@ module.exports = (scope, cb) => {
}
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();
}),
@ -347,11 +351,11 @@ module.exports = (scope, cb) => {
const connectedToTheDatabase = (withMessage = true) => {
console.log();
if (withMessage) {
if (withMessage) {
console.log(`The app has been connected to the database ${green('successfully')}!`);
console.log();
}
trackSuccess('didConnectDatabase', scope);
cb.success();

View File

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

View File

@ -31,7 +31,7 @@ const packageJSON = require('../package.json');
*/
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;
@ -85,9 +85,9 @@ module.exports = function (name, cliArguments) {
const error = (error) => {
fetch('https://analytics.strapi.io/track', {
method: 'POST',
body: JSON.stringify({
event: 'didNotStartAutomatically',
deviceId: machineIdSync(),
body: JSON.stringify({
event: 'didNotStartAutomatically',
deviceId: machineIdSync(),
properties: {
error,
os: os.type()
@ -122,7 +122,7 @@ module.exports = function (name, cliArguments) {
input: process.stdin,
output: process.stdout
});
rl.on("SIGINT", function () {
process.emit("SIGINT");
});