Open
Conversation
Collaborator
|
Does specifying the same input & output file not working thus requiring this new flag? |
Author
|
On Mon, 26 Jun 2017 19:30:28 -0700 "Alex Lam S.L." ***@***.***> wrote:
Does specifying the same input & output file not working thus requiring this
new flag?
Hi!
Well, I'd expect it to work, but it can only handle one file at a time, whereas
--inplace can handle multiple files similar to «perl -pi -e
's#str#replacement#g' *.html [more files here]». Needing to invoke an
executable separately for each and every file may be prohibitive speed-wise, for
instance for this use case:
shlomif/shlomi-fish-homepage@3bb006e
Regards,
…-- @shlomif
|
Author
|
Ping! Any news? Is there anything else I can do? |
Collaborator
|
This PR does not pass Travis CI: https://travis-ci.org/kangax/html-minifier/builds/247290811 On the code changes itself, there is no need to introduce |
Author
|
On Sun, 16 Jul 2017 21:05:05 -0700 "Alex Lam S.L." ***@***.***> wrote:
This PR does not pass Travis CI:
https://travis-ci.org/kangax/html-minifier/builds/247290811
I'll try to fix it.
On the code changes itself, there is no need to introduce `inplace` as
`commander` already stores the `--inplace` flag.
Can it be accessed the same way?
Also I fail to see why a
simple setting of output file/directory to that of input wouldn't suffice,
rather than all the extra file handling code.
Well, with an output file there is only one that can be specified and you may
wish to process several files in one invocation. An output directory is only
valid if there is an input directory, and in this case all files inside the
directory and its subdirectory will be processed, while I want to avoid
processing some of them or only process a few selected ones. It is also
sometimes convenient to specify "--inplace" from the command line.
Regards,
@shlomif
|
With a rudimentary test that isn't invoked by default.
98c9aa4 to
6c54f3a
Compare
Author
|
Travis-CI fixed now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With a rudimentary test that isn't invoked by default. This is similar to the -i flag of perl, ruby or GNU sed in that it modifies existing files.