Moved vendor directory into app and removed node_modules from release artifacts

This commit is contained in:
Chris Kankiewicz 2020-01-27 12:38:31 -07:00
parent 65870bac46
commit b884b80d17
No known key found for this signature in database
GPG Key ID: 474E915709CEB5EB
13 changed files with 24 additions and 25 deletions

View File

@ -1,3 +1,3 @@
.git
app/vendor
node_modules
vendor

View File

@ -24,11 +24,11 @@ fit with the overall direction and goals of Directory Lister.
### Static Analysis
$ vendor/bin/psalm
$ app/vendor/bin/psalm
### Run Tests
$ vendor/bin/phpunit
$ app/vendor/bin/phpunit
---

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
/app/vendor/
/node_modules/
/vendor/
.env
.php_cs.cache
.phpunit.result.cache

View File

@ -2,8 +2,8 @@
$finder = PhpCsFixer\Finder::create()->in([
__DIR__ . DIRECTORY_SEPARATOR . 'app',
__DIR__ . DIRECTORY_SEPARATOR . 'tests'
])->notPath('cache');
__DIR__ . DIRECTORY_SEPARATOR . 'tests',
])->notPath(['cache', 'vendor']);
return PhpCsFixer\Config::create()->setRules([
'@PSR1' => true,

View File

@ -11,10 +11,11 @@ disabled:
- trailing_comma_in_multiline_array
finder:
exclude:
- "vendor"
name:
- "*.php"
path:
- "app"
- "tests"
name:
- "*.php"
exclude:
- "app/cache"
- "app/vendor"

View File

@ -14,14 +14,14 @@ matrix:
cache:
directories:
- $HOME/.composer/cache
- vendor
- app/vendor
before_install: phpenv config-rm xdebug.ini || true
install: composer install
before_script:
- vendor/bin/php-cs-fixer fix --diff --dry-run
- vendor/bin/psalm
- app/vendor/bin/php-cs-fixer fix --diff --dry-run
- app/vendor/bin/psalm
script: vendor/bin/phpunit --coverage-text
script: app/vendor/bin/phpunit --coverage-text

View File

@ -14,9 +14,7 @@ use Tightenco\Collect\Support\Collection;
class FinderProvider
{
/** @const Application paths to be hidden */
protected const APP_FILES = [
'app', 'node_modules', 'vendor', 'index.php'
];
protected const APP_FILES = ['app', 'index.php'];
/** @const Array of sort options mapped to their respective methods */
public const SORT_METHODS = [

View File

@ -1,9 +1,7 @@
app
node_modules
vendor
.env.example
.htaccess
directory-lister.svg
index.php
LICENSE
README.md
index.php

View File

@ -40,6 +40,7 @@
},
"config": {
"sort-packages": true,
"optimize-autoloader": true
"optimize-autoloader": true,
"vendor-dir": "app/vendor"
}
}

View File

@ -5,7 +5,7 @@ use App\Controllers;
use DI\Container;
use Dotenv\Dotenv;
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/app/vendor/autoload.php';
// Set file access restrictions
ini_set('open_basedir', __DIR__);

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php" colors="true">
<phpunit bootstrap="app/vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="Directory Lister Test Suite">
<directory suffix="Test.php">tests/</directory>
@ -10,6 +10,7 @@
<directory suffix=".php">app/</directory>
<exclude>
<directory>app/cache</directory>
<directory>app/vendor</directory>
</exclude>
</whitelist>
</filter>

View File

@ -11,7 +11,7 @@
<directory name="app" />
<ignoreFiles>
<directory name="app/cache" />
<directory name="vendor" />
<directory name="app/vendor" />
</ignoreFiles>
</projectFiles>

View File

@ -5,7 +5,7 @@ require('laravel-mix-purgecss');
mix.setPublicPath('.');
mix.webpackConfig({
watchOptions: { ignored: ['node_modules', 'vendor'] }
watchOptions: { ignored: ['node_modules', 'app/vendor'] }
});
mix.sass('app/resources/sass/app.scss', 'app/assets/app.css').options({