FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lesscss-java/src/main/java/org/lesscss/Compile.java at master · nothinking/lesscss-java · GitHub
nothinking
lesscss-java
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
lesscss-java
/
src
/
main
/
java
/
org
/
lesscss
/
Compile.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (25 loc) · 1.02 KB
Breadcrumbs
lesscss-java
/
src
/
main
/
java
/
org
/
lesscss
/
Compile.java
Copy path
File metadata and controls
35 lines (25 loc) · 1.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
package
org
.
lesscss
;
import
org
.
lesscss
.
logging
.
LessLogger
;
import
org
.
lesscss
.
logging
.
LessLoggerFactory
;
import
java
.
io
.
File
;
import
java
.
util
.
Arrays
;
import
java
.
util
.
List
;
public
class
Compile
{
private
static
final
LessLogger
logger
=
LessLoggerFactory
.
getLogger
(
Compile
.
class
);
public
static
void
main
(
String
[]
args
)
throws
Exception
{
if
(
args
.
length
<
1
) {
logger
.
info
(
"usage: org.lesscss.Compile <args> <less_filename>"
);
System
.
exit
(-
1
);
}
List
<
String
>
argList
=
Arrays
.
asList
(
args
);
String
fileName
=
argList
.
get
(
argList
.
size
() -
1
);
argList
=
argList
.
subList
(
0
,
argList
.
size
() -
1
);
File
output
=
new
File
(
fileName
+
".css"
);
logger
.
info
(
"Compiler output = %s"
,
output
.
getCanonicalPath
() );
long
start
=
System
.
currentTimeMillis
();
LessCompiler
lessCompiler
=
new
LessCompiler
(
argList
);
lessCompiler
.
compile
(
new
File
(
fileName
),
output
);
long
duration
=
System
.
currentTimeMillis
() -
start
;
logger
.
info
(
"Done. %,d ms"
,
duration
);
}
}
Back
|
FazBrowse Home
|
New Git URL