flex icon indicating copy to clipboard operation
flex copied to clipboard

Real composer scripts

Open shyim opened this issue 2 years ago • 4 comments

While using in the manifest composer-scripts I just assumed its the scripts part of the composer.json and thats currently not 😅 .

It would be nice to be able to define them like

{
"composer-commands": {
"build-js": "npm run build"
}
}

and then I can run them with composer run build-js. This works already out of the box with Composer when its in the correct key set 😅

shyim avatar Apr 26 '22 14:04 shyim

Is a makefile an alternative?

JoshuaBehrens avatar Apr 26 '22 14:04 JoshuaBehrens

Why not. That'd require a new configurator. PR welcome.

nicolas-grekas avatar Apr 30 '22 22:04 nicolas-grekas

Hello

I also think that this would be a nice feature.

My user case. I have created repository with configuration for PHP coding standard. We have private recipe, which copy file and also modify Makefile - thanks to flex. I have created PR - which add a new configuration option to recipe composer-commands, so we could migrate to this configurator from Makefile. Feedback is welcome.

morawskim avatar Jun 08 '22 17:06 morawskim

Why not. That'd require a new configurator. PR welcome.

@nicolas-grekas You mean like this one? https://github.com/symfony/flex/blob/1.x/src/Configurator/MakefileConfigurator.php#L21 :)

HeahDude avatar Jun 18 '22 07:06 HeahDude