Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New] add --indent CLI arg; add tabs support #126

Closed
wants to merge 1 commit into from
Closed

[New] add --indent CLI arg; add tabs support #126

wants to merge 1 commit into from

Conversation

ljharb
Copy link

@ljharb ljharb commented Jan 8, 2020

Fixes #121

Happy to add tests and usage examples if this is the right direction to be going.

(Separately, i think thinks would be a lot cleaner if you used something like yargs as an arg parser, but that's out of scope for this PR)

@antonmedv
Copy link
Owner

I don’t like adding more flags to fx. Can we use .fxrc cars for this setting?
Also I try to use as little bpm packages as possible. This allows to faster startup time.

@ljharb
Copy link
Author

ljharb commented Jan 8, 2020

I'm not sure why using npm packages would meaningfully increase startup time, but sure, that's up to you.

As for flags - .fxrc is not an option for me because i want to use it as a systemwide utility, in any project. I could use an environment variable, however, if that would be preferable?

@antonmedv
Copy link
Owner

I'm not sure why using npm packages would meaningfully increase startup time, but sure, that's up to you

It will. How you suppose it can be done without extra costs? For example adding yargs adds around 50 ms delay.

And I trying to keep fx under 100 ms startup time.

I could use an environment variable, however, if that would be preferable?

Yes, env is better. Also can you support other params too?

@ljharb
Copy link
Author

ljharb commented Jan 9, 2020

Sure, what'd you have in mind? Most of the config things are functions (impossible to support via env vars), or shell colors (awkward to support via env vars), so this seems like the only one.

@antonmedv
Copy link
Owner

Hmmm, yes. You are right. Let's find some solutions. Maybe completely refactor to env instead of function?

@ljharb
Copy link
Author

ljharb commented Jan 9, 2020

That's certainly an approach - but it might be better to wait for a use case to present itself before creating churn, and i'm sure .fxrc makes a lot of sense for many use cases. At the moment the only new use case i'm aware of is for indentation :-)

@antonmedv
Copy link
Owner

I rewrote the entire fx in golang. So I belove this PR is no longer actual.

@antonmedv antonmedv closed this Apr 20, 2022
@ljharb
Copy link
Author

ljharb commented Apr 20, 2022

@antonmedv does it have --indent as an option, with tabs support?

@ljharb ljharb deleted the indent branch April 20, 2022 21:37
@antonmedv
Copy link
Owner

Will have FX_INDENT env variable.

@antonmedv
Copy link
Owner

Right now fx has themes support with FX_THEME. So I'm going to add FX_INDENT as well.

BTW, fx still supports JS reducerts and .fxrc file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customize indentation?
2 participants