-
Notifications
You must be signed in to change notification settings - Fork 0
/
0002-lessc-util.print-has-been-deprecated.patch
59 lines (52 loc) · 1.72 KB
/
0002-lessc-util.print-has-been-deprecated.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 1eb62dabc4bdf865d8e97396dad295f74d0d9678 Mon Sep 17 00:00:00 2001
From: Martin Styk <mart.styk@gmail.com>
Date: Mon, 1 Jan 2024 16:18:58 +0100
Subject: Remove util.print usage since it is deprecated.
Signed-off-by: Martin Styk <mart.styk@oracle.com>
---
bin/lessc | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/bin/lessc b/bin/lessc
index 4c1efb2..13c24e2 100644
--- a/bin/lessc
+++ b/bin/lessc
@@ -2,7 +2,6 @@
var path = require('path'),
fs = require('fs'),
- sys = require('util'),
os = require('os'),
mkdirp;
@@ -315,10 +314,10 @@ var ensureDirectory = function (filepath) {
if (options.depends) {
if (!outputbase) {
- sys.print("option --depends requires an output path to be specified");
+ console.log("option --depends requires an output path to be specified");
return;
}
- sys.print(outputbase + ": ");
+ process.stdout.write(outputbase + ": ");
}
if (!sourceMapFileInline) {
@@ -349,9 +348,9 @@ var parseLessFile = function (e, data) {
return;
} else if (options.depends) {
for(var file in parser.imports.files) {
- sys.print(file + " ")
+ process.stdout.write(file + " ")
}
- sys.print("\n");
+ console.log("");
} else {
try {
if (options.lint) { writeSourceMap = function() {} }
@@ -383,7 +382,7 @@ var parseLessFile = function (e, data) {
console.log('lessc: wrote ' + output);
}
} else {
- sys.print(css);
+ process.stdout.write(css);
}
}
} catch (e) {
--
2.43.0