xp-framework / compiler

Compiles future PHP to today's PHP.
19 stars 0 forks source link

Implement command line option to set file extension for compiled files #159

Closed thekid closed 1 year ago

thekid commented 1 year ago

Default:

$ xp compile HelloWorld.php dist/
# ...

$ ls -al dist/HelloWorld*
-rwxr-xr-x 1 timmf timmf 519 Feb 19 13:12 dist/HelloWorld.class.php

Using .php file extension:

$ xp compile -e .php HelloWorld.php dist/
# ...

$ ls -al dist/HelloWorld*
-rwxr-xr-x 1 timmf timmf 519 Feb 19 13:13 dist/HelloWorld.php

See https://github.com/xp-framework/compiler/pull/158#issuecomment-1435988175