Fixed gruntfile
This commit is contained in:
parent
ae7d138fa6
commit
ed6be635f1
3 changed files with 33 additions and 11 deletions
19
Gruntfile.js
19
Gruntfile.js
|
@ -60,7 +60,24 @@ module.exports = function (grunt) {
|
|||
},
|
||||
|
||||
zip: {
|
||||
'release.zip': ['app/**/*', 'bin/**/*', 'bootstrap/**/*', 'logs/**/*', 'resources/**/', 'static/**/*', '.htaccess', 'config.example.php', 'index.php', 'vendor']
|
||||
'release.zip': [
|
||||
'app/**/*',
|
||||
'bin/**/*',
|
||||
'bootstrap/**/*',
|
||||
'logs/**/',
|
||||
'resources/cache',
|
||||
'resources/sessions',
|
||||
'resources/database',
|
||||
'resources/templates/**/*',
|
||||
'resources/schemas/**/*',
|
||||
'static/**/*',
|
||||
'vendor/**/*',
|
||||
'.htaccess',
|
||||
'config.example.php',
|
||||
'index.php',
|
||||
'composer.json',
|
||||
'composer.lock'
|
||||
]
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -116,7 +116,7 @@ class DB
|
|||
* @param string|null $username
|
||||
* @param string|null $password
|
||||
*/
|
||||
public static function setDsn(string $dsn, string $username = null, string $password = null): void
|
||||
public static function setDsn(string $dsn, string $username = null, string $password = null)
|
||||
{
|
||||
self::$dsn = $dsn;
|
||||
self::$username = $username;
|
||||
|
|
23
bin/theme
23
bin/theme
|
@ -10,19 +10,24 @@ if (php_sapi_name() !== 'cli') {
|
|||
$json = json_decode(file_get_contents('https://bootswatch.com/api/4.json'));
|
||||
|
||||
if (!isset($argv[1])) {
|
||||
echo 'Usage: php bin\\theme <theme-name>' . PHP_EOL;
|
||||
echo 'Usage: php bin\\theme <theme-name|"default">' . PHP_EOL;
|
||||
echo 'Here a list of available Bootswatch themes:' . PHP_EOL;
|
||||
}
|
||||
|
||||
foreach ($json->themes as $theme) {
|
||||
if (isset($argv[1]) && strtolower($argv[1]) === strtolower($theme->name)) {
|
||||
file_put_contents('static/bootstrap/css/bootstrap.min.css', file_get_contents($theme->cssMin));
|
||||
echo "Installed theme {$theme->name}." . PHP_EOL;
|
||||
break;
|
||||
}
|
||||
if (isset($argv[1]) && strtolower($argv[1]) === 'default') {
|
||||
file_put_contents('static/bootstrap/css/bootstrap.min.css', file_get_contents('https://bootswatch.com/_vendor/bootstrap/dist/css/bootstrap.min.css'));
|
||||
echo "Reverted to default theme." . PHP_EOL;
|
||||
} else {
|
||||
foreach ($json->themes as $theme) {
|
||||
if (isset($argv[1]) && strtolower($argv[1]) === strtolower($theme->name)) {
|
||||
file_put_contents('static/bootstrap/css/bootstrap.min.css', file_get_contents($theme->cssMin));
|
||||
echo "Installed theme {$theme->name}." . PHP_EOL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!isset($argv[1])) {
|
||||
echo " - {$theme->name} ({$theme->description})[Preview: {$theme->preview}]" . PHP_EOL;
|
||||
if (!isset($argv[1])) {
|
||||
echo " - {$theme->name} ({$theme->description})[Preview: {$theme->preview}]" . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue