Skip to content

Commit

Permalink
Update FilamentShortUrlServiceProvider and package.json for new outpu…
Browse files Browse the repository at this point in the history
…t filenames and migration checks
  • Loading branch information
a21ns1g4ts committed Feb 7, 2025
1 parent e4fd49b commit 4821fe1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"private": true,
"type": "module",
"scripts": {
"dev:styles": "npx tailwindcss -i resources/css/index.css -o resources/dist/filament-shop.css --postcss --watch",
"dev:styles": "npx tailwindcss -i resources/css/index.css -o resources/dist/filament-short-url.css --postcss --watch",
"dev:scripts": "node bin/build.js --dev",
"build:styles": "npx tailwindcss -i resources/css/index.css -o resources/dist/filament-shop.css --postcss --minify && npm run purge",
"build:styles": "npx tailwindcss -i resources/css/index.css -o resources/dist/filament-short-url.css --postcss --minify && npm run purge",
"build:scripts": "node bin/build.js",
"purge": "filament-purge -i resources/dist/filament-shop.css -o resources/dist/filament-shop.css -v 3.x",
"purge": "filament-purge -i resources/dist/filament-short-url.css -o resources/dist/filament-short-url.css -v 3.x",
"dev": "npm-run-all --parallel dev:*",
"build": "npm-run-all build:*"
},
Expand All @@ -23,4 +23,4 @@
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwindcss": "^3.3.3"
}
}
}
8 changes: 8 additions & 0 deletions src/FilamentShortUrlServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,17 @@ public function configurePackage(Package $package): void
$package->hasConfigFile();
}

if (file_exists($package->basePath('/../database/migrations'))) {
$package->hasMigrations($this->getMigrations());
}

if (file_exists($package->basePath('/../resources/lang'))) {
$package->hasTranslations();
}

if (file_exists($package->basePath('/../resources/views'))) {
$package->hasViews(static::$viewNamespace);
}
}

public function packageRegistered(): void {}
Expand Down

0 comments on commit 4821fe1

Please sign in to comment.