FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ejsTutorial/node_modules/ejs/jakefile.js at master · mehambas/ejsTutorial · GitHub
mehambas
ejsTutorial
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ejsTutorial
/
node_modules
/
ejs
/
jakefile.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
75 lines (64 loc) · 1.99 KB
Breadcrumbs
ejsTutorial
/
node_modules
/
ejs
/
jakefile.js
Copy path
File metadata and controls
75 lines (64 loc) · 1.99 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
73
74
75
var
fs
=
require
(
'fs'
)
;
var
execSync
=
require
(
'child_process'
)
.
execSync
;
var
exec
=
function
(
cmd
)
{
execSync
(
cmd
,
{
stdio
:
'inherit'
}
)
;
}
;
/* global jake, task, desc, publishTask */
task
(
'build'
,
[
'lint'
,
'clean'
,
'browserify'
,
'minify'
]
,
function
(
)
{
console
.
log
(
'Build completed.'
)
;
}
)
;
desc
(
'Cleans browerified/minified files and package files'
)
;
task
(
'clean'
,
[
'clobber'
]
,
function
(
)
{
jake
.
rmRf
(
'./ejs.js'
)
;
jake
.
rmRf
(
'./ejs.min.js'
)
;
console
.
log
(
'Cleaned up compiled files.'
)
;
}
)
;
desc
(
'Lints the source code'
)
;
task
(
'lint'
,
[
'clean'
]
,
function
(
)
{
exec
(
'./node_modules/.bin/eslint "**/*.js"'
)
;
console
.
log
(
'Linting completed.'
)
;
}
)
;
task
(
'browserify'
,
function
(
)
{
exec
(
'./node_modules/browserify/bin/cmd.js --standalone ejs lib/ejs.js > ejs.js'
)
;
console
.
log
(
'Browserification completed.'
)
;
}
)
;
task
(
'minify'
,
function
(
)
{
exec
(
'./node_modules/uglify-js/bin/uglifyjs ejs.js > ejs.min.js'
)
;
console
.
log
(
'Minification completed.'
)
;
}
)
;
desc
(
'Generates the EJS API docs'
)
;
task
(
'doc'
,
function
(
dev
)
{
jake
.
rmRf
(
'out'
)
;
var
p
=
dev
?
'-p'
:
''
;
exec
(
'./node_modules/.bin/jsdoc '
+
p
+
' -c jsdoc.json lib/* docs/jsdoc/*'
)
;
console
.
log
(
'Documentation generated.'
)
;
}
)
;
desc
(
'Publishes the EJS API docs'
)
;
task
(
'docPublish'
,
[
'doc'
]
,
function
(
)
{
fs
.
writeFileSync
(
'out/CNAME'
,
'api.ejs.co'
)
;
console
.
log
(
'Pushing docs to gh-pages...'
)
;
exec
(
'./node_modules/.bin/git-directory-deploy --directory out/'
)
;
console
.
log
(
'Docs published to gh-pages.'
)
;
}
)
;
desc
(
'Runs the EJS test suite'
)
;
task
(
'test'
,
[
'lint'
]
,
function
(
)
{
exec
(
'./node_modules/.bin/mocha'
)
;
}
)
;
publishTask
(
'ejs'
,
[
'build'
]
,
function
(
)
{
this
.
packageFiles
.
include
(
[
'jakefile.js'
,
'README.md'
,
'LICENSE'
,
'package.json'
,
'ejs.js'
,
'ejs.min.js'
,
'lib/**'
,
'bin/**'
,
'usage.txt'
]
)
;
}
)
;
jake
.
Task
.
publish
.
on
(
'complete'
,
function
(
)
{
console
.
log
(
'Updating hosted docs...'
)
;
console
.
log
(
'If this fails, run jake docPublish to re-try.'
)
;
jake
.
Task
.
docPublish
.
invoke
(
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL