Add jquery

This commit is contained in:
Johannes Meyer 2022-06-14 13:40:25 +02:00
parent 660609dafa
commit 14ab15bb1b
2 changed files with 24 additions and 1 deletions

14
AssetLoader.php Normal file
View File

@ -0,0 +1,14 @@
<?php
class AssetLoader
{
public static function update(Composer\Script\Event $event)
{
if (! is_dir('asset/js/jquery')) {
mkdir('asset/js/jquery', 0775, true);
}
copy('vendor/components/jquery/jquery.js', 'asset/js/jquery/jquery.js');
copy('vendor/components/jquery/jquery.min.js', 'asset/js/jquery/jquery.min.js');
}
}

View File

@ -41,8 +41,17 @@
"react/stream": "^1", "react/stream": "^1",
"guzzlehttp/psr7": "^1", "guzzlehttp/psr7": "^1",
"guzzlehttp/guzzle": "^6.5", "guzzlehttp/guzzle": "^6.5",
"jfcherng/php-diff": "^6.10" "jfcherng/php-diff": "^6.10",
"components/jquery": "3.6.*"
}, },
"require-dev": { "require-dev": {
},
"autoload": {
"psr-0": { "AssetLoader": "" }
},
"scripts": {
"post-update-cmd": [
"AssetLoader::update"
]
} }
} }