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

Delete files in outide folder. Force with you #5

Open
kartofelek007 opened this issue May 21, 2015 · 1 comment
Open

Delete files in outide folder. Force with you #5

kartofelek007 opened this issue May 21, 2015 · 1 comment

Comments

@kartofelek007
Copy link

Now we can't sync files outside workind directory. Add options and force:

grunt.registerMultiTask('delete_sync', 'Synchronize file deletion between two directories.', function() {
        var options = this.options();
        this.files.map(function(file) {
            file.src.map(function (val) {
                var targetFileName = file.cwd + '/' + val;
                if(grunt.file.isFile(targetFileName) && !grunt.file.exists(file.syncWith + '/' + val)) {
                    grunt.log.writeln('Deleting file ' + targetFileName);
                    grunt.file.delete(targetFileName, options);
                }
            });
        });

    });
loremIpsum: {
      options : {
             force : true
      },
      cwd: '../../../web/loremIpsum',
      src: ['**/*'],
      syncWith: 'dist/loremIpsum'
},
@kaanra
Copy link

kaanra commented Jul 17, 2015

Hi, I've run into this same issue. Will force options, or the ability to delete files outside the folder be added?

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

2 participants