Skip to content

Commit

Permalink
Merge pull request #33 from tonysm/importmap-bin
Browse files Browse the repository at this point in the history
Adds a `bin/importmap` script
  • Loading branch information
tonysm authored Oct 31, 2023
2 parents 54f2a01 + c1f487b commit f9078bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bin/importmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

ARGS=(php artisan)

if [ $# -gt 0 ]; then
ARGS+=("importmap:$@")
else
ARGS+=(list importmap)
fi

OUTPUT=$("${ARGS[@]}")
MODIFIED_OUTPUT="${OUTPUT//importmap:/importmap }"

echo "${MODIFIED_OUTPUT}"
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5"
},
"bin": [
"bin/importmap"
],
"autoload": {
"psr-4": {
"Tonysm\\ImportmapLaravel\\": "src"
Expand Down

0 comments on commit f9078bd

Please sign in to comment.