ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
module.exports = function (grunt) {
|
||||
'use strict';
|
||||
|
||||
var glob = require('glob'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
fst = require('../tools/fs-tools.js'),
|
||||
pc = require('../configs/path');
|
||||
|
||||
grunt.registerTask('black-list-generator', function () {
|
||||
process.chdir(grunt.option('dir') || '.');
|
||||
|
||||
var whiteListFile = glob.sync(pc.static.whitelist + '*.txt')[0],
|
||||
blacklistFile = pc.static.blacklist + path.basename(whiteListFile),
|
||||
whiteList = fst.getData(whiteListFile);
|
||||
|
||||
fst.arrayRead(whiteList, function (data) {
|
||||
fst.write(blacklistFile, data);
|
||||
});
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user