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-sass/tasks/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /* eslint-disable prefer-object-spread, promise/prefer-await-to-then */
'use strict';
const util = require('util');
const path = require('path');
module.exports = grunt => {
grunt.registerMultiTask('sass', 'Compile Sass to CSS', function () {
const done = this.async();
const options = this.options({
precision: 10
});
if (!options.implementation) {
grunt.fatal('The implementation option must be passed to the Sass task');
}
grunt.verbose.writeln(`\n${options.implementation.info}\n`);
(async () => {
await Promise.all(this.files.map(async item => {
const [src] = item.src;
if (!src || path.basename(src)[0] === '_') {
return;
}
const result = await util.promisify(options.implementation.render)(Object.assign({}, options, {
file: src,
outFile: item.dest
}));
grunt.file.write(item.dest, result.css);
if (options.sourceMap) {
const filePath = options.sourceMap === true ? `${item.dest}.map` : options.sourceMap;
grunt.file.write(filePath, result.map);
}
}));
})().catch(error => {
grunt.fatal(error.formatted || error);
}).then(done);
});
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0083 ]-- |