Fix setup time info

This commit is contained in:
soupette 2018-04-18 11:51:16 +02:00
parent f0eca93f93
commit f419f9383c
3 changed files with 18 additions and 28 deletions

File diff suppressed because one or more lines are too long

View File

@ -55,16 +55,6 @@ const FIRST_BLOCK = [
},
];
const WELCOME_AGAIN_BLOCK = [
{
title: {
id: 'app.components.HomePage.welcome.again',
},
name: upperFirst(`${get(auth.getUserInfo(), 'username')}!`),
content: () => <WelcomeContent hasContent />,
},
];
const FIRST_BLOCK_LINKS = [
{
link: 'https://strapi.io/documentation/',
@ -169,6 +159,15 @@ export class HomePage extends React.PureComponent {
render() {
const { homePage: { articles, body } } = this.props;
const WELCOME_AGAIN_BLOCK = [
{
title: {
id: 'app.components.HomePage.welcome.again',
},
name: upperFirst(`${get(auth.getUserInfo(), 'username')}!`),
content: () => <WelcomeContent hasContent />,
},
];
return (
<div className={cn('container-fluid', styles.containerFluid)}>

View File

@ -37,26 +37,18 @@ const watcher = (label, cmd, withSuccess = true) => {
};
const asyncWatcher = (label, cmd, withSuccess = true) => {
const asyncWatcher = (label, cmd, withSuccess = true, resolve) => {
if (label.length > 0) {
shell.echo(label);
}
const child = shell.exec(cmd, {
silent,
async: true,
});
child.stdout.on('data', data => {
if (data.stderr && data.code !== 0) {
console.error(data.stderr);
return shell.exec(cmd, { silent, async: true }, (code, stdout, stderr) => {
if (stderr && code !== 0) {
console.error(stderr);
process.exit(1);
}
if (label.length > 0 && withSuccess) {
shell.echo('✅ Success');
shell.echo('');
}
return resolve();
});
};
@ -154,14 +146,13 @@ watcher('', 'npm install ../strapi-generate-api --no-optional');
shell.rm('-f', 'package-lock.json');
watcher('📦 Linking strapi-plugin-content-type-builder...', 'npm link --no-optional', false);
const pluginsToBuild = ['admin', 'content-manager', 'content-type-builder', 'email', 'upload', 'users-permissions'];
const pluginsToBuild = ['admin', 'content-manager', 'content-type-builder', 'email', 'upload', 'users-permissions', 'settings-manager'];
const buildPlugins = async () => {
const build = (pckgName) => {
return new Promise(async (resolve) => {
return new Promise(resolve => {
const name = pckgName === 'admin' ? pckgName: `plugin-${pckgName}`;
asyncWatcher(`🏗 Building ${name}...`, `cd ../strapi-${name} && npm run build`, false);
resolve();
asyncWatcher(`🏗 Building ${name}...`, `cd ../strapi-${name} && npm run build`, false, resolve);
});
};