Skip to content

Commit 7170743

Browse files
committed
Fixed docs layout issues.
Replaced px with REMs in docs css. Added new logo. Added optimised svgs. Added webpack dev server for testing docs. Updated vscode launch and tasks config.
1 parent 3fea03f commit 7170743

22 files changed

+1325
-1041
lines changed

.vscode/launch.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
"name": "Debug docs",
2121
"type": "chrome",
2222
"request": "launch",
23-
"url": "http://127.0.0.1:8080",
23+
"url": "http://127.0.0.1:9000",
2424
"webRoot": "${workspaceFolder}/dist/docs",
25+
"preLaunchTask": "serve",
26+
"postDebugTask": "endTask",
2527
"sourceMaps": true,
26-
"smartStep": true,
2728
"sourceMapPathOverrides": {
28-
"webpack:///./src/docs/*": "${workspaceFolder}/src/docs/*"
29+
"webpack:///./src/docs/index.ts": "${workspaceFolder}/src/docs/index.ts"
2930
},
3031
"runtimeArgs": [
3132
"--remote-debugging-port=9222",
@@ -37,7 +38,11 @@
3738
"type": "node",
3839
"request": "launch",
3940
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
40-
"args": ["-r", "ts-node/register", "test/unit/*.test.ts"],
41+
"args": [
42+
"-r",
43+
"ts-node/register",
44+
"test/unit/*.test.ts"
45+
],
4146
"cwd": "${workspaceRoot}",
4247
"protocol": "inspector",
4348
"sourceMaps": true,
@@ -48,7 +53,11 @@
4853
"type": "node",
4954
"request": "launch",
5055
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
51-
"args": ["-r", "ts-node/register", "test/integration/*.test.ts"],
56+
"args": [
57+
"-r",
58+
"ts-node/register",
59+
"test/integration/*.test.ts"
60+
],
5261
"cwd": "${workspaceRoot}",
5362
"protocol": "inspector",
5463
"sourceMaps": true,

.vscode/tasks.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
"tasks": [
66
{
77
"type": "npm",
8+
"label": "build",
89
"script": "build",
9-
"identifier": "build",
10-
"label": "Build API",
1110
"group": {
1211
"kind": "build",
1312
"isDefault": true
@@ -21,6 +20,38 @@
2120
"problemMatcher": [
2221
"$tsc"
2322
]
23+
},
24+
{
25+
"type": "npm",
26+
"label": "serve",
27+
"script": "serve",
28+
"isBackground": true,
29+
"presentation": {
30+
"reveal": "always",
31+
"panel": "shared"
32+
},
33+
"problemMatcher": {
34+
"owner": "typescript",
35+
"fileLocation": "relative",
36+
"pattern": {
37+
"regexp": "^([^\\s].*)\\((\\d+|\\,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
38+
"file": 1,
39+
"location": 2,
40+
"severity": 3,
41+
"code": 4,
42+
"message": 5
43+
},
44+
"background": {
45+
"activeOnStart": true,
46+
"beginsPattern": ".",
47+
"endsPattern": "Compiled",
48+
}
49+
}
50+
},
51+
{
52+
"label": "endTask",
53+
"type": "process",
54+
"command": "${command:workbench.action.tasks.terminate}"
2455
}
2556
]
2657
}

dist/docs/7f7662a34ec930fe4875fec3b16c5000.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

dist/docs/clouds.svg

Lines changed: 1 addition & 0 deletions
Loading

dist/docs/icon-128.png

-1.32 KB
Loading

dist/docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8 /> <meta name=viewport content="width=device-width,initial-scale=1"/> <meta name=robots content=noindex /> <title>xBrowserSync API</title> <link rel=icon type=image/png href=./icon-128.png sizes=128x128> <link href="styles.css" rel="stylesheet"></head> <body id=home class=index> <div class=bg-main> <div class=bg-main-img></div> </div> <button type=button class=nav-menu-button> <span class=hamburger aria-hidden=true></span> <span class=sr-only>Menu</span> </button> <nav id=mainNav class="navbar navbar-expand-md navbar-default navbar-fixed-top navbar-custom affix"> <div class=container> <div class="collapse navbar-collapse" id=navbar> <ul class=navbar-nav> <li class=nav-item> <a class=nav-link href=#home>Home</a> </li> <li class=nav-item> <a class=nav-link href=#status>Status</a> </li> <li class=nav-item> <a class=nav-link href=#bookmarks>Bookmarks</a> </li> <li class=nav-item> <a class=nav-link href=#serviceinfo>Service Information</a> </li> </ul> </div> </div> </nav> <header> <div class=container> <div class=row> <div class="col-md-4 offset-md-2"> <h1>xBrowserSync</h1> </div> <div class="title col-md-6"> <h2>API service info</h2> </div> </div> </div> </header> <section id=status class=dark> <div class=container> <div class=row> <div class="serviceinfo col-lg-8 offset-lg-2"> <span> <strong>Status:</strong> <span id=currentstatus></span> </span> <span> <strong>Version:</strong> <span id=version></span> </span> </div> <div class="col-lg-8 offset-lg-2"> <div id=servermessage></div> </div> </div> <div class=row> <div class="col-lg-8 offset-lg-2"> <p>This xBrowserSync service provides a REST API that xBrowserSync clients can sync to. The available API methods are listed below.</p> <p>For more information visit the <a href=https://www.xbrowsersync.org/ >xBrowserSync website</a> or check out the <a href=https://github.com/xbrowsersync/api>API GitHub repo</a>.</p> </div> </div> </div> </section> <section id=bookmarks> <div class=container> <div class=panel> <h3>Bookmarks</h3> <div class=header> <h4>Create bookmarks</h4> <div> <span class="label label-warning">Post</span> <code>/bookmarks</code> </div> </div> <p>Creates a new (empty) bookmark sync and returns the corresponding ID.</p> <div class=example> <p>Post body example:</p> <pre><code>{
1+
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8 /> <meta name=viewport content="width=device-width,initial-scale=1"/> <meta name=robots content=noindex /> <title>xBrowserSync API</title> <link rel=icon type=image/png href=./icon-128.png sizes=128x128> <link href="styles.css" rel="stylesheet"></head> <body id=home class=index> <div class=background> <div class=background-img></div> </div> <button type=button class=nav-menu-button> <span class=hamburger aria-hidden=true></span> <span class=sr-only>Menu</span> </button> <nav id=mainNav class="navbar navbar-expand-md navbar-default navbar-fixed-top navbar-custom affix"> <div class=container> <div class="collapse navbar-collapse" id=navbar> <ul class=navbar-nav> <li class=nav-item> <a class=nav-link href=#home>Home</a> </li> <li class=nav-item> <a class=nav-link href=#status>Status</a> </li> <li class=nav-item> <a class=nav-link href=#bookmarks>Bookmarks</a> </li> <li class=nav-item> <a class=nav-link href=#serviceinfo>Service Information</a> </li> </ul> </div> </div> </nav> <header> <div class=container> <div class=row> <div class="col-md-4 offset-md-2"> <h1>xBrowserSync</h1> </div> <div class="title col-md-6"> <h2>API service info</h2> </div> </div> </div> </header> <section id=status class=dark> <div class=container> <div class=row> <div class="serviceinfo offline"> <div class=status> <span> <strong>Status:</strong> <span id=currentstatus></span> </span> <span class=version> <strong>Version:</strong> <span id=version></span> </span> </div> <div id=servermessage></div> </div> </div> <div class=row> <div class="col-lg-8 offset-lg-2"> <p>This xBrowserSync service provides a REST API that xBrowserSync clients can sync to. The available API methods are listed below.</p> <p>For more information visit the <a href=https://www.xbrowsersync.org/ >xBrowserSync website</a> or check out the <a href=https://github.com/xbrowsersync/api>API GitHub repo</a>.</p> </div> </div> </div> </section> <section id=bookmarks> <div class=container> <div class=panel> <h3>Bookmarks</h3> <div class=header> <h4>Create bookmarks</h4> <div> <span class="label label-warning">Post</span> <code>/bookmarks</code> </div> </div> <p>Creates a new (empty) bookmark sync and returns the corresponding ID.</p> <div class=example> <p>Post body example:</p> <pre><code>{
22
"version":"1.0.0"
33
}</code></pre> <ul> <li> <strong>version:</strong> Version number of the xBrowserSync client used to create the sync.</li> </ul> <p>Response example:</p> <pre><code>{
44
"id":"52758cb942814faa9ab255208025ae59",

dist/docs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/docs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)