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

Resolving the infamous Visual Studio Inconsistent Line Ending after beautify #309

Open
developer1998 opened this issue Mar 21, 2015 · 0 comments

Comments

@developer1998
Copy link

This is due to the fact that linefeed used by grunt is not the one supported by x64 windows.
Used to be a work-around to use grunt.util.linefeed, but this is obsolete, and got replaced with unsupported grunt-legacy-util.

What I did is use grunt-lineending which converts line endings.
After running uglify, on the destination directory run grunt-lineending with the following options:

        lineending: {
            normalize_scripts: {
                options: {
                    overwrite: true,
                    eol: 'crlf'
                },
                files: [{
                    expand: true,
                    cwd: 'wwwroot/lib/my_scripts',
                    src: ['*.js', '!*.min.js'],
                    dest: ''
                }]
            }
        }
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

No branches or pull requests

1 participant