assemblyscript icon indicating copy to clipboard operation
assemblyscript copied to clipboard

Can `--transform` support to pass args ?

Open yjhmelody opened this issue 3 years ago • 6 comments

It seems there is no way to pass args to control the behaviors of transform hooks. Has any plan to support it ? Or any other instead way to do it.

yjhmelody avatar Feb 19 '21 03:02 yjhmelody

If there is a need for it, perhaps we can add it. Maybe something along the lines of --transform path/to/transform?arg1=1&arg2=2?

dcodeIO avatar Feb 19 '21 05:02 dcodeIO

Further, it may be better if we can get some args passed to asc.

yjhmelody avatar Feb 22 '21 02:02 yjhmelody

Is it possible to obtain what --use flags were passed to the compiler? :)

jtenner avatar Feb 22 '21 03:02 jtenner

If there is a need for it, perhaps we can add it. Maybe something along the lines of --transform path/to/transform?arg1=1&arg2=2?

It's a good idea. And transform hook also need to know asc's args.

yjhmelody avatar Feb 22 '21 08:02 yjhmelody

Yeah I think that passing the CLI args to the transform is all you need. Since you'd get the extra args unknown to the normal CLI.

willemneal avatar Mar 17 '21 14:03 willemneal

@dcodeIO Do you have some ideas about this features?

yjhmelody avatar Jul 07 '22 16:07 yjhmelody