-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathasset.php
More file actions
25 lines (20 loc) · 663 Bytes
/
asset.php
File metadata and controls
25 lines (20 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
concat(__DIR__ . '/public/css/app.min.css', [
__DIR__ . '/public/css/bootstrap.min.css',
__DIR__ . '/public/css/bootstrap-icons.min.css',
__DIR__ . '/public/css/prismjs.min.css',
__DIR__ . '/public/css/app.css',
]);
concat(__DIR__ . '/public/dist/app.min.js', [
__DIR__ . '/public/js/bootstrap.min.js',
__DIR__ . '/public/js/prismjs.min.js',
__DIR__ . '/public/js/app.js',
]);
function concat(string $targetFile, array $files) {
$result = [];
foreach ($files as $file) {
$result[] = file_get_contents($file);
}
file_put_contents($targetFile, implode("\n", $result));
}
//shell_exec('npm run build');