FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node-htmlprocessor/bin/htmlprocessor at master · tarzan/node-htmlprocessor · GitHub
tarzan
/
node-htmlprocessor
Public
forked from
dciccale/node-htmlprocessor
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node-htmlprocessor
/
bin
/
htmlprocessor
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
72 lines (67 loc) · 1.56 KB
Breadcrumbs
node-htmlprocessor
/
bin
/
htmlprocessor
Copy path
File metadata and controls
executable file
·
72 lines (67 loc) · 1.56 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env node
/*
* node-htmlprocessor
* https://github.com/dciccale/node-htmlprocessor
*
* Copyright (c) 2013-2014 Denis Ciccale (@tdecs)
* Licensed under the MIT license.
* https://github.com/dciccale/node-htmlprocessor/blob/master/LICENSE-MIT
*/
var
path
=
require
(
'path'
)
;
var
index
=
require
(
'../index'
)
;
var
pkg
=
require
(
'../package.json'
)
;
var
args
=
process
.
argv
.
slice
(
2
)
;
var
options
=
{
}
;
var
files
=
[
]
;
var
output
;
while
(
args
.
length
>
0
)
{
var
v
=
args
.
shift
(
)
;
switch
(
v
)
{
case
'-d'
:
case
'--data'
:
options
.
data
=
require
(
path
.
resolve
(
args
.
shift
(
)
)
)
;
break
;
case
'-e'
:
case
'--env'
:
options
.
environment
=
args
.
shift
(
)
;
break
;
case
'-c'
:
case
'--comment-marker'
:
options
.
commentMarker
=
args
.
shift
(
)
;
break
;
case
'-i'
:
case
'--include-base'
:
options
.
includeBase
=
args
.
shift
(
)
;
break
;
case
'-r'
:
case
'--recursive'
:
options
.
recursive
=
args
.
shift
(
)
;
break
;
case
'-s'
:
case
'--strip'
:
options
.
strip
=
true
break
;
case
'-v'
:
case
'--version'
:
console
.
log
(
pkg
.
version
)
;
process
.
exit
(
1
)
;
break
;
case
'-o'
:
case
'--output'
:
output
=
args
.
shift
(
)
;
break
;
case
'--custom-block-type'
:
options
.
customBlockTypes
=
[
args
.
shift
(
)
]
;
break
;
case
'-h'
:
case
'--help'
:
console
.
log
(
'show help'
)
;
break
;
default
:
if
(
v
&&
v
.
indexOf
(
'-'
)
===
0
)
{
throw
(
'Unknown option: '
+
v
)
;
}
files
.
push
(
v
)
;
}
}
index
(
{
src
:
files
,
dest
:
output
}
,
options
)
;
Back
|
FazBrowse Home
|
New Git URL