Improvements to the package system

This commit is contained in:
Sergio Brighenti 2019-05-09 12:51:33 +02:00
parent abe3733b09
commit ba3de850f7
7 changed files with 50 additions and 4 deletions

View file

@ -115,11 +115,23 @@ module.exports = function (grunt) {
'LICENSE', 'LICENSE',
'favicon.ico', 'favicon.ico',
] ]
},
shell: {
phpstan: {
command: '"./vendor/bin/phpstan" analyse app resources/lang bin install'
},
composer_no_dev: {
command: 'composer install --no-dev'
}
} }
}); });
require('load-grunt-tasks')(grunt); require('load-grunt-tasks')(grunt);
grunt.registerTask('default', ['jshint', 'cssmin', 'uglify', 'copy']); grunt.registerTask('default', ['jshint', 'cssmin', 'uglify', 'copy']);
grunt.registerTask('test', ['jshint']); grunt.registerTask('test', ['jshint']);
grunt.registerTask('build-release', ['default', 'zip']); grunt.registerTask('phpstan', ['shell:phpstan']);
grunt.registerTask('composer_no_dev', ['shell:composer_no_dev']);
grunt.registerTask('build-release', ['default', 'composer_no_dev', 'zip']);
}; };

View file

@ -25,6 +25,7 @@ class Session
'name' => $name, 'name' => $name,
'save_path' => $path, 'save_path' => $path,
'cookie_httponly' => true, 'cookie_httponly' => true,
'gc_probability' => 25,
]); ]);
if (!$started) { if (!$started) {

2
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "e650b40bdd96d101030a0e33a7ff5ffe", "content-hash": "120224d788960ba61ae3d0e49e173ad3",
"packages": [ "packages": [
{ {
"name": "container-interop/container-interop", "name": "container-interop/container-interop",

View file

@ -1,5 +1,5 @@
<?php <?php
(PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 1) ?: die('Sorry, PHP >=7.1 is required to run XBackBone.'); (PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 1) ?: die('Sorry, PHP 7.1 or above is required to run XBackBone.');
require __DIR__ . '/vendor/autoload.php'; require __DIR__ . '/vendor/autoload.php';
define('BASE_DIR', __DIR__ . DIRECTORY_SEPARATOR); define('BASE_DIR', __DIR__ . DIRECTORY_SEPARATOR);

View file

@ -1,5 +1,5 @@
<?php <?php
(PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 1) ?: die('Sorry, PHP >=7.1 is required to run XBackBone.'); (PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 1) ?: die('Sorry, PHP 7.1 or above is required to run XBackBone.');
require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';
use App\Database\DB; use App\Database\DB;

32
package-lock.json generated
View file

@ -586,6 +586,26 @@
"integrity": "sha1-8mqEj2pHl6X/foUOYCIMDea+jnI=", "integrity": "sha1-8mqEj2pHl6X/foUOYCIMDea+jnI=",
"dev": true "dev": true
}, },
"grunt-shell": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/grunt-shell/-/grunt-shell-3.0.1.tgz",
"integrity": "sha512-C8eR4frw/NmIFIwSvzSLS4wOQBUzC+z6QhrKPzwt/tlaIqlzH35i/O2MggVOBj2Sh1tbaAqpASWxGiGsi4JMIQ==",
"dev": true,
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true
}
}
},
"grunt-zip": { "grunt-zip": {
"version": "0.18.2", "version": "0.18.2",
"resolved": "https://registry.npmjs.org/grunt-zip/-/grunt-zip-0.18.2.tgz", "resolved": "https://registry.npmjs.org/grunt-zip/-/grunt-zip-0.18.2.tgz",
@ -877,6 +897,12 @@
"integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
"dev": true "dev": true
}, },
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"dev": true
},
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
@ -942,6 +968,12 @@
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true "dev": true
}, },
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
"dev": true
},
"path-type": { "path-type": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",

View file

@ -16,6 +16,7 @@
"grunt-contrib-jshint": "^2.1.0", "grunt-contrib-jshint": "^2.1.0",
"grunt-contrib-uglify": "^4.0.1", "grunt-contrib-uglify": "^4.0.1",
"grunt-contrib-watch": "^1.1.0", "grunt-contrib-watch": "^1.1.0",
"grunt-shell": "^3.0.1",
"grunt-zip": "^0.18.2", "grunt-zip": "^0.18.2",
"load-grunt-tasks": "^4.0.0" "load-grunt-tasks": "^4.0.0"
} }