Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/node-red/node_modules/grunt-contrib-compress/tasks/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /*
* grunt-contrib-compress
* http://gruntjs.com/
*
* Copyright (c) 2016 Chris Talkington, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
var _ = require('lodash');
var compress = require('./lib/compress')(grunt);
grunt.registerMultiTask('compress', 'Compress files.', function() {
compress.options = this.options({
archive: null,
mode: null,
createEmptyArchive: true,
level: 1
});
if (compress.options.createEmptyArchive === false && this.files.length === 0) {
grunt.log.ok('No files found. Archive won\'t be created ("createEmptyArchive" option is set to true)');
return;
}
if (typeof compress.options.archive === 'function') {
compress.options.archive = compress.options.archive();
}
compress.options.mode = compress.options.mode || compress.autoDetectMode(compress.options.archive);
if (_.includes(['zip', 'tar', 'tgz', 'gzip', 'deflate', 'deflateRaw', 'brotli'], compress.options.mode) === false) {
grunt.fail.warn('Mode ' + String(compress.options.mode) + ' not supported.');
}
if (/gzip|brotli/.test(compress.options.mode) || compress.options.mode.slice(0, 7) === 'deflate') {
compress[compress.options.mode](this.files, this.async());
} else {
compress.tar(this.files, this.async());
}
});
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0119 ]-- |