Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

31 Zeilen
841 B

  1. /**
  2. * Copyright © Magento, Inc. All rights reserved.
  3. * See COPYING.txt for license details.
  4. */
  5. module.exports = function (grunt) {
  6. 'use strict';
  7. var fs = require('fs'),
  8. _ = require('underscore'),
  9. glob = require('glob'),
  10. fst = require('../tools/fs-tools'),
  11. pc = require('../configs/path'),
  12. removeFromFile = function (path, files) {
  13. var data = _.difference(fst.getData(path), files);
  14. fst.write(path, data);
  15. };
  16. grunt.registerTask('clean-black-list', function () {
  17. process.chdir(grunt.option('dir') || '.');
  18. var filesToRemove = grunt.option('file').split(','),
  19. files = glob.sync(pc.static.blacklist + '*.txt');
  20. _.each(files, function (file) {
  21. removeFromFile(file, filesToRemove);
  22. });
  23. });
  24. };