FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular.js/gen_jstd_configs.js at master · rayhunter/angular.js · GitHub
rayhunter
angular.js
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
angular.js
/
gen_jstd_configs.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
47 lines (35 loc) · 1.69 KB
Breadcrumbs
angular.js
/
gen_jstd_configs.js
Copy path
File metadata and controls
executable file
·
47 lines (35 loc) · 1.69 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
#!/usr/bin/env node
/* This file reads in list of files from angularFiles.js and generate various jstd config files */
var
fs
=
require
(
'fs'
)
,
angularSrc
,
angularScenario
;
fs
.
readFile
(
'angularFiles.js'
,
function
(
err
,
data
)
{
eval
(
data
.
toString
(
)
)
;
var
prefix
=
'server: http://localhost:9876\n\n'
,
prefixScenario
=
'server: http://localhost:9877\n\n'
;
angularSrc
=
angularFiles
.
angularSrc
.
join
(
'\n- '
)
;
angularScenario
=
angularFiles
.
angularScenario
.
join
(
'\n- '
)
;
fs
.
writeFile
(
'./jsTestDriver.conf'
,
prefix
+
combine
(
angularFiles
.
jstd
,
angularFiles
.
jstdExclude
)
)
;
fs
.
writeFile
(
'./jsTestDriver-modules.conf'
,
prefix
+
combine
(
angularFiles
.
jstdModules
)
)
;
fs
.
writeFile
(
'./jsTestDriver-scenario.conf'
,
prefixScenario
+
combine
(
angularFiles
.
jstdScenario
)
+
'\n\nproxy:\n- {matcher: "*", server: "http://localhost:8000"}'
)
;
fs
.
writeFile
(
'./jsTestDriver-perf.conf'
,
prefix
+
combine
(
angularFiles
.
jstdPerf
,
angularFiles
.
jstdPerfExclude
)
)
;
fs
.
writeFile
(
'./jsTestDriver-jquery.conf'
,
prefix
+
combine
(
angularFiles
.
jstdJquery
,
angularFiles
.
jstdJqueryExclude
)
)
;
fs
.
writeFile
(
'./jsTestDriver-coverage.conf'
,
prefix
+
combine
(
angularFiles
.
jstd
,
angularFiles
.
jstdExclude
)
+
'\n\nplugin:\n- name: "coverage"\n'
+
'jar: "lib/jstestdriver/coverage.jar"\n'
+
'module: "com.google.jstestdriver.coverage.CoverageModule"'
)
;
}
)
;
function
combine
(
load
,
exclude
)
{
var
fileList
=
'load:\n- '
+
load
.
join
(
'\n- '
)
;
if
(
exclude
)
fileList
+=
(
'\n\nexclude:\n- '
+
exclude
.
join
(
'\n- '
)
)
;
//Replace placeholders for src list before returning
return
fileList
.
replace
(
/
@
(
.
*
)
/
g
,
function
(
all
,
alias
)
{
return
angularFiles
[
alias
]
.
join
(
'\n- '
)
;
}
)
;
}
Back
|
FazBrowse Home
|
New Git URL