Skip to content

Commit

Permalink
Merge pull request #188 from koriym/phar-install
Browse files Browse the repository at this point in the history
Modified to allow installation via homebrew
  • Loading branch information
koriym authored Jun 15, 2024
2 parents 9c23ea0 + 96a76f0 commit 2ebd644
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 156 deletions.
6 changes: 3 additions & 3 deletions bin/asd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ usage: asd [options] alps_file
EOT;
exit(0);
}
$options = getopt('c:w::m::', ['config:', 'watch::', 'color::', 'mode::', 'port::']);
$options = getopt('c:w::m::', ['config:', 'watch::', 'color::', 'mode::', 'port::', "extract"]);
if ($argc === 1) {
$options['c'] = getcwd();
}
Expand All @@ -46,10 +46,10 @@ try {
if ($config->watch) {

$actualPath = Phar::running(false) !== '' ?
dirname(Phar::running(false),2) . '/asd-sync':
dirname(Phar::running(false),2) . '/libexec/asd-sync':
dirname(__DIR__) . '/asd-sync';
chdir($actualPath);
$isFirstRun = ! is_dir(dirname(__DIR__) . '/asd-sync/node_modules');
$isFirstRun = ! is_dir($actualPath . '/asd-sync/node_modules');
if ($isFirstRun) {
passthru('npm install');
}
Expand Down
1 change: 1 addition & 0 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"vendor-xml2json"
],
"files": [
"alps.xsd",
"docs/assets/js/asd@0.1.0.js",
"docs/assets/css/main.css",
"vendor/autoload.php"
Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,18 @@
"sa": ["psalm --show-info=true", "./vendor/bin/phpstan analyse -c phpstan.neon"],
"metrics": ["./vendor/bin/phpmetrics --report-html=build/metrics --exclude=Exception --log-junit=build/junit.xml --junit=build/junit.xml src"],
"phpmd": ["./vendor/bin/phpmd src text ./phpmd.xml"],
"compile": ["./vendor/bin/box compile"],
"compile": ["composer update --no-dev", "rm -rf asd-sync/node_modules" ,"./vendor-bin/box/vendor/bin/box compile"],
"build": ["@cs", "@sa", "@pcov", "@metrics", "@compile"]
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": true
}
}
}
1 change: 1 addition & 0 deletions src/TransDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ final class TransDescriptor extends AbstractDescriptor
public function __construct(stdClass $descriptor, SemanticDescriptor $parent)
{
parent::__construct($descriptor);

assert(is_string($descriptor->type));
$this->type = $descriptor->type;
if (! isset($descriptor->rt) || ! is_string($descriptor->rt)) {
Expand Down
209 changes: 99 additions & 110 deletions tests/Fake/config/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vendor-bin/tools/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"doctrine/coding-standard": "^9.0",
"doctrine/coding-standard": "^12.0",
"phpmd/phpmd": "^2.9",
"phpmetrics/phpmetrics": "^2.7",
"phpstan/phpstan": "^1.1",
Expand Down
90 changes: 49 additions & 41 deletions vendor-bin/tools/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2ebd644

Please sign in to comment.