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

Allow to write to dest #22

Closed
twolfson opened this issue Nov 3, 2013 · 4 comments
Closed

Allow to write to dest #22

twolfson opened this issue Nov 3, 2013 · 4 comments
Milestone

Comments

@twolfson
Copy link

twolfson commented Nov 3, 2013

Most grunt plugins do not modify a file in-place. Can you add a dest option to output the beautified content?

{
  src: 'abc.min.js',
  dest: 'abc.js'
}
@vkadam vkadam closed this as completed Dec 14, 2013
@vkadam
Copy link
Owner

vkadam commented Dec 14, 2013

Added support in 0.2.5 version.

@twolfson
Copy link
Author

This was not properly implemented. grunt has dest as a built in property for tasks.

http://gruntjs.com/configuring-tasks#files

@vkadam
Copy link
Owner

vkadam commented Dec 14, 2013

I don't think it will conflict, as "dest" is not on root object, its options.dest

{
  src: 'abc.min.js',
  options: {
    dest: "dest"
  }
}

Also please not "dest" will be path of folder and not file name.
I have bumped up version to 0.2.6.(Renamed dist to dest, thanks to you)

@twolfson
Copy link
Author

I am stating that you are not following grunt conventions. It is expected that the src files will be written to dest when the task completes. dest is expected to be a path to a file, not a folder.

If you want to build a batch grunt task, then that should be something separate (e.g. jsbeautifier-dir).

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

No branches or pull requests

2 participants