settings updates, fixed
This commit is contained in:
+4
-5
@@ -23,6 +23,7 @@ host('main')
|
|||||||
->set('remote_user', 'mag')
|
->set('remote_user', 'mag')
|
||||||
->set('branch', 'main')
|
->set('branch', 'main')
|
||||||
->set('deploy_path', '/var/www/helpdesk_dev');
|
->set('deploy_path', '/var/www/helpdesk_dev');
|
||||||
|
|
||||||
host('develop')
|
host('develop')
|
||||||
->set('hostname', 'helpdesk.mlba.dev')
|
->set('hostname', 'helpdesk.mlba.dev')
|
||||||
->set('remote_user', 'mag')
|
->set('remote_user', 'mag')
|
||||||
@@ -33,23 +34,23 @@ task('build', function (): void {
|
|||||||
run('export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm use {{node_version}} && cd {{release_path}} && npm ci --no-audit --no-fund');
|
run('export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm use {{node_version}} && cd {{release_path}} && npm ci --no-audit --no-fund');
|
||||||
run('export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm use {{node_version}} && cd {{release_path}} && npm run build');
|
run('export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm use {{node_version}} && cd {{release_path}} && npm run build');
|
||||||
});
|
});
|
||||||
task('seo:sitemap', function (): void {
|
|
||||||
run('cd {{release_path}} && php artisan thredary:sitemap');
|
|
||||||
});
|
|
||||||
|
|
||||||
task('queue:restart', function (): void {
|
task('queue:restart', function (): void {
|
||||||
run('cd {{release_path}} && php artisan queue:restart');
|
run('cd {{release_path}} && php artisan queue:restart');
|
||||||
});
|
});
|
||||||
|
|
||||||
task('deploy:write_revision_file', function (): void {
|
task('deploy:write_revision_file', function (): void {
|
||||||
run('cd {{release_path}} && echo "{{branch}}" > BRANCH');
|
run('cd {{release_path}} && echo "{{branch}}" > BRANCH');
|
||||||
run('cd {{release_path}} && date -u +"%Y-%m-%dT%H:%M:%SZ" > DEPLOYED_AT');
|
run('cd {{release_path}} && date -u +"%Y-%m-%dT%H:%M:%SZ" > DEPLOYED_AT');
|
||||||
});
|
});
|
||||||
|
|
||||||
task('artisan:clear', function (): void {
|
task('artisan:clear', function (): void {
|
||||||
run('cd {{release_path}} && php artisan view:clear');
|
run('cd {{release_path}} && php artisan view:clear');
|
||||||
run('cd {{release_path}} && php artisan optimize:clear');
|
run('cd {{release_path}} && php artisan optimize:clear');
|
||||||
run('cd {{release_path}} && php artisan config:clear');
|
run('cd {{release_path}} && php artisan config:clear');
|
||||||
run('cd {{release_path}} && php artisan route:clear');
|
run('cd {{release_path}} && php artisan route:clear');
|
||||||
});
|
});
|
||||||
|
|
||||||
task('services:restart', function (): void {
|
task('services:restart', function (): void {
|
||||||
run('sudo -n nginx -t');
|
run('sudo -n nginx -t');
|
||||||
run('sudo -n systemctl reload nginx');
|
run('sudo -n systemctl reload nginx');
|
||||||
@@ -59,8 +60,6 @@ task('services:restart', function (): void {
|
|||||||
after('deploy:update_code', 'deploy:write_revision_file');
|
after('deploy:update_code', 'deploy:write_revision_file');
|
||||||
after('deploy:vendors', 'build');
|
after('deploy:vendors', 'build');
|
||||||
after('deploy:symlink', 'artisan:clear');
|
after('deploy:symlink', 'artisan:clear');
|
||||||
#after('deploy:symlink', 'seo:sitemap');
|
|
||||||
#after('seo:sitemap', 'queue:restart');
|
|
||||||
after('deploy:symlink', 'queue:restart');
|
after('deploy:symlink', 'queue:restart');
|
||||||
after('deploy:failed', 'deploy:unlock');
|
after('deploy:failed', 'deploy:unlock');
|
||||||
after('deploy:symlink', 'services:restart');
|
after('deploy:symlink', 'services:restart');
|
||||||
|
|||||||
+6
-3
@@ -3,18 +3,21 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "node scripts/install-module-dependencies.mjs",
|
|
||||||
"build": "vite build --config ./vite.config.js",
|
"build": "vite build --config ./vite.config.js",
|
||||||
"dev": "vite --config ./vite.config.js"
|
"dev": "vite --config ./vite.config.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@fortawesome/fontawesome-free": "^7.0.0",
|
||||||
"@laravel/passkeys": "^0.2.0",
|
"@laravel/passkeys": "^0.2.0",
|
||||||
"@tailwindcss/vite": "^4.1.11",
|
"@tailwindcss/vite": "^4.1.11",
|
||||||
|
"axios": "^1.13.2",
|
||||||
"concurrently": "^10.0.3",
|
"concurrently": "^10.0.3",
|
||||||
|
"flatpickr": "^4.6.13",
|
||||||
|
"jquery": "3.7.1",
|
||||||
"laravel-vite-plugin": "^3.1",
|
"laravel-vite-plugin": "^3.1",
|
||||||
|
"select2": "^4.1.0",
|
||||||
"tailwindcss": "^4.0.7",
|
"tailwindcss": "^4.0.7",
|
||||||
"vite": "^8.0.0",
|
"vite": "^8.0.0"
|
||||||
"@fortawesome/fontawesome-free": "^7.0.0"
|
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@laravel/multiplex": "^0.4.1",
|
"@laravel/multiplex": "^0.4.1",
|
||||||
|
|||||||
+19
-19
@@ -2,11 +2,21 @@ import { defineConfig } from 'vite';
|
|||||||
import laravel from 'laravel-vite-plugin';
|
import laravel from 'laravel-vite-plugin';
|
||||||
import { bunny } from 'laravel-vite-plugin/fonts';
|
import { bunny } from 'laravel-vite-plugin/fonts';
|
||||||
import tailwindcss from '@tailwindcss/vite';
|
import tailwindcss from '@tailwindcss/vite';
|
||||||
import { existsSync, readdirSync, realpathSync, statSync } from 'node:fs';
|
import { existsSync, readdirSync, statSync } from 'node:fs';
|
||||||
import { join, relative } from 'node:path';
|
import { join, relative } from 'node:path';
|
||||||
|
|
||||||
const projectRoot = process.cwd();
|
const projectRoot = process.cwd();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compile assets from every Laravel module using the canonical module layout:
|
||||||
|
*
|
||||||
|
* Modules/<Module>/Resources/assets/css/app.css
|
||||||
|
* Modules/<Module>/Resources/assets/js/app.js
|
||||||
|
*
|
||||||
|
* Only the canonical `Resources` directory is scanned. This avoids duplicate
|
||||||
|
* entries on case-insensitive macOS filesystems where `Resources` and
|
||||||
|
* `resources` resolve to the same files.
|
||||||
|
*/
|
||||||
function discoverModuleInputs() {
|
function discoverModuleInputs() {
|
||||||
const modulesPath = join(projectRoot, 'Modules');
|
const modulesPath = join(projectRoot, 'Modules');
|
||||||
|
|
||||||
@@ -15,7 +25,6 @@ function discoverModuleInputs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const inputs = [];
|
const inputs = [];
|
||||||
const physicalFiles = new Set();
|
|
||||||
|
|
||||||
for (const moduleName of readdirSync(modulesPath)) {
|
for (const moduleName of readdirSync(modulesPath)) {
|
||||||
const modulePath = join(modulesPath, moduleName);
|
const modulePath = join(modulesPath, moduleName);
|
||||||
@@ -24,21 +33,13 @@ function discoverModuleInputs() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const resourcesDirectory of ['Resources', 'resources']) {
|
for (const entry of [
|
||||||
for (const entry of ['assets/css/app.css', 'assets/js/app.js']) {
|
'Resources/assets/css/app.css',
|
||||||
const candidate = join(modulePath, resourcesDirectory, entry);
|
'Resources/assets/js/app.js',
|
||||||
|
]) {
|
||||||
|
const candidate = join(modulePath, entry);
|
||||||
|
|
||||||
if (!existsSync(candidate)) {
|
if (existsSync(candidate)) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const physicalPath = realpathSync(candidate);
|
|
||||||
|
|
||||||
if (physicalFiles.has(physicalPath)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
physicalFiles.add(physicalPath);
|
|
||||||
inputs.push(relative(projectRoot, candidate));
|
inputs.push(relative(projectRoot, candidate));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,7 +54,7 @@ console.log('[Vite] Backend theme inputs:');
|
|||||||
console.log(' resources/themes/backend/assets/css/app.css');
|
console.log(' resources/themes/backend/assets/css/app.css');
|
||||||
console.log(' resources/themes/backend/assets/js/passkeys.js');
|
console.log(' resources/themes/backend/assets/js/passkeys.js');
|
||||||
|
|
||||||
if (moduleInputs.length) {
|
if (moduleInputs.length > 0) {
|
||||||
console.log('[Vite] Module inputs:');
|
console.log('[Vite] Module inputs:');
|
||||||
|
|
||||||
for (const input of moduleInputs) {
|
for (const input of moduleInputs) {
|
||||||
@@ -75,8 +76,6 @@ export default defineConfig({
|
|||||||
'resources/themes/backend/assets/**/*',
|
'resources/themes/backend/assets/**/*',
|
||||||
'Modules/*/Resources/views/**/*.blade.php',
|
'Modules/*/Resources/views/**/*.blade.php',
|
||||||
'Modules/*/Resources/assets/**/*',
|
'Modules/*/Resources/assets/**/*',
|
||||||
'Modules/*/resources/views/**/*.blade.php',
|
|
||||||
'Modules/*/resources/assets/**/*',
|
|
||||||
'Modules/**/*.php',
|
'Modules/**/*.php',
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -93,6 +92,7 @@ export default defineConfig({
|
|||||||
|
|
||||||
server: {
|
server: {
|
||||||
cors: true,
|
cors: true,
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
ignored: [
|
ignored: [
|
||||||
'**/storage/framework/views/**',
|
'**/storage/framework/views/**',
|
||||||
|
|||||||
Reference in New Issue
Block a user