Skip to content

Commit

Permalink
Make dev app clean up its temp files
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Apr 29, 2018
1 parent 101a710 commit 65f77f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use File::Spec::Functions 'catfile';
use Mojolicious 7.31;
use Mojolicious::Lite;
use File::Copy;
use File::Copy qw/move/;
use Mojo::File qw/path/;
use File::Temp qw/tempfile/;

Expand Down Expand Up @@ -73,9 +73,9 @@ sub gen_assets {
Mojo::File->new($temp_js)->spurt(
join "\n", @{app->asset->processed('app.js')->map(sub {$_->content})}
);
copy $temp_css, 'html/css/app.css'
move $temp_css, 'html/css/app.css'
or app->log->warn("Copying CSS failed: $!");
copy $temp_js, 'html/js/app.js'
move $temp_js, 'html/js/app.js'
or app->log->warn("Copying JS failed: $!");
app->log->info('...done');

Expand Down

0 comments on commit 65f77f5

Please sign in to comment.