Skip to content

code duplication #147

@giulianozorzi

Description

@giulianozorzi

Hello,
I was redirected here by a member of the grunt-fixmyjs team.
I'm using fixmyjs 1.0.3 grunt-fixmyjs version 0.3.0 with the grunt 1.0.1 and grunt-vli 1.2.0, all installed by npm

my grunt task is the following:

fixmyjs: {
options: {
config: '.jshintrc',
indentpref: 'spaces'
},
test: {
files: [
{
expand: true,
cwd: 'static/js',
src: ['*/.js'],
dest: 'static/js/',
ext: '.js'
}
]
}
},
Sometimes (I could not find a way to replicate I get duplicated code (ie if the source file contains

var a = true;
I end up with

var a = true;
var a = true;
the tasks I'm running are in order

fixmyjs
jshint
concat
uglify
Is there a way to determine what causes this and fix this behaviour ? As now I've changed the task so the ext is changed to

ext: '.fixed.js'

but I'd really like to fix my js files for good :)

thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions