We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73c245e commit 40e1519Copy full SHA for 40e1519
src/Console/Commands/ExportMessages.php
@@ -48,9 +48,17 @@ public function handle()
48
$adapter = new Local( $filepath );
49
$filesystem = new Filesystem( $adapter );
50
51
- $contents = 'let messages = ' . json_encode( $messages );
+ $contents = 'export default ' . json_encode( $messages );
52
53
- $filesystem->write( $filename, $contents );
+ if ( $filesystem->has( $filename ) ) {
54
+
55
+ $filesystem->delete( $filename );
56
+ $filesystem->write( $filename, $contents );
57
58
+ } else {
59
60
61
+ }
62
63
$this->info( 'Messages exported to JavaScript file, you can find them at ' . $filepath . DIRECTORY_SEPARATOR
64
. $filename );
0 commit comments