Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Make output messages optional (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Blijleven authored and martinlindhe committed Oct 2, 2018
1 parent 012424e commit 1353505
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Commands/GenerateInclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ public function handle()
if ($multipleFiles) {
$files = (new Generator($config))
->generateMultiple($root, $umd);
echo "Written to :" . PHP_EOL . $files . PHP_EOL;

if ($config['showOutputMessages']) {
echo "Written to :" . PHP_EOL . $files . PHP_EOL;
}

exit();
}

Expand All @@ -47,6 +51,8 @@ public function handle()
$jsFile = base_path() . config('vue-i18n-generator.jsFile');
file_put_contents($jsFile, $data);

echo "Written to " . $jsFile . PHP_EOL;
if ($config['showOutputMessages']) {
echo "Written to " . $jsFile . PHP_EOL;
}
}
}
11 changes: 11 additions & 0 deletions src/config/vue-i18n-generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,15 @@
|
*/
'i18nLib' => 'vue-i18n',

/*
|--------------------------------------------------------------------------
| Output messages
|--------------------------------------------------------------------------
|
| Specify if the library should show "written to" messages
| after generating json files.
|
*/
'showOutputMessages' => false,
];

0 comments on commit 1353505

Please sign in to comment.