You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,8 @@ Wraith uses a json based configuration file that allows you specify a large numb
32
32
Below is an example configuration file:
33
33
34
34
{
35
-
Optional name for the project, if supplied it will be used within the generated gallery only
35
+
Optional name for the project, if supplied it will be used within the generated
36
+
gallery only
36
37
"project": "Test",
37
38
38
39
Specify one or two domains
@@ -41,14 +42,17 @@ Below is an example configuration file:
41
42
"http://live.bbc.co.uk"
42
43
],
43
44
44
-
Engines supported are phantomjs and slimerjs but in theory any phantomjs based headless browser can be supported.
45
+
Engines supported are phantomjs and slimerjs but in theory any phantomjs based
46
+
headless browser can be supported.
45
47
46
48
To do cross browser testing specify one domain and two engines or your choice
47
49
"engines": [
48
50
"phantomjs"
49
51
],
50
52
51
-
Specify as many sizes as you wish. If no sizes are specified then the most popular sizes will be used based on the information provided by w3counter.com stats
53
+
Specify as many sizes as you wish. If no sizes are specified then the most
54
+
popular sizes will be used based on the information provided by
55
+
w3counter.com stats
52
56
"sizes": [
53
57
"320",
54
58
"768",
@@ -59,8 +63,8 @@ Below is an example configuration file:
59
63
"outputDir": "test/chrome/",
60
64
61
65
You can specify a list of paths to be used or you can crawl the site.
62
-
63
-
Note: If paths are provided they will take precedent and the spider file will be ignored.
66
+
Note: If paths are provided they will take precedent and the spider file
67
+
will be ignored.
64
68
65
69
"paths": [
66
70
"/",
@@ -70,15 +74,20 @@ Below is an example configuration file:
70
74
"/weather/"
71
75
],
72
76
73
-
If no paths are specified then a site crawl will take place and the results will be save in the location specified within this option
77
+
If no paths are specified then a site crawl will take place and the results
78
+
will be save in the location specified within this option
74
79
"spider": "spider/test.txt",
75
80
76
81
Limit the amount of concurrent processes
77
82
"maxConnections": 20
78
83
}
79
84
80
85
###API
81
-
This is very basic at the minute but you can use wraith within your applications. At the minute there is only one option which is to run the application with a given config file and then run a specified callback but I am looking to expand this in the future.
86
+
This is very basic at the minute but you can use wraith within your applications.
87
+
88
+
At the minute there is only one option which is to run the application with a given config file and then run a specified callback but I am looking to expand this in the future.
89
+
90
+
npm install wraith --save-dev
82
91
83
92
var wraith = require('wraith');
84
93
var config = require('./config/chrome');
@@ -87,7 +96,8 @@ This is very basic at the minute but you can use wraith within your applications
87
96
console.log('Callback, do something else here!');
88
97
});
89
98
90
-
As the config is just an object you can change it at any point before calling the wraith function e.g.
99
+
As the config is just an object you can change it at any point before calling
0 commit comments