summaryrefslogtreecommitdiffstats
path: root/browsersync-config.js
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-02-12 11:47:24 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-02-21 09:23:47 +0100
commit8a61a53027a0e3a1854c659de8b83dcb76737da6 (patch)
tree04a93a9d8f547038956d30a081c95e980539ace0 /browsersync-config.js
parenttdf#123500 double '~' character in translation (diff)
downloadonline-8a61a53027a0e3a1854c659de8b83dcb76737da6.tar.gz
online-8a61a53027a0e3a1854c659de8b83dcb76737da6.zip
Integrate browser-sync
Tool to automatically reload used .css and .js files. To make it work symlinks are created instead of a copy if browsersync is enabled. 1. install: npm install -g browser-sync 2. use configure option: --enable-browsersync 3. remove loleaflet/dist directory 4. run server: LOOL_SERVE_FROM_FS=1 make run -j10 5. run browsersync: browser-sync start --config browsersync-config.js or make sync-writer Change-Id: Iebee1cc0b9a03bc866954ff33e3cb8a10b48e0af
Diffstat (limited to 'browsersync-config.js')
-rw-r--r--browsersync-config.js108
1 files changed, 108 insertions, 0 deletions
diff --git a/browsersync-config.js b/browsersync-config.js
new file mode 100644
index 0000000000..c11f4d3705
--- /dev/null
+++ b/browsersync-config.js
@@ -0,0 +1,108 @@
+
+/*
+ |--------------------------------------------------------------------------
+ | Browser-sync config file
+ |--------------------------------------------------------------------------
+ |
+ | For up-to-date information about the options:
+ | http://www.browsersync.io/docs/options/
+ |
+ | There are more options than you see here, these are just the ones that are
+ | set internally. See the website for more info.
+ |
+ |
+ */
+module.exports = {
+ "ui": {
+ "port": 3001
+ },
+ "files": ["loleaflet/dist/**/*.css", "loleaflet/dist/**/*.js"],
+ "watchEvents": [
+ "change"
+ ],
+ "watch": false,
+ "ignore": [],
+ "single": false,
+ "watchOptions": {
+ "ignoreInitial": true
+ },
+ "server": false,
+ "proxy": "http://localhost:9980/",
+ "port": 3000,
+ "middleware": false,
+ "serveStatic": [],
+ "ghostMode": {
+ "clicks": true,
+ "scroll": true,
+ "location": true,
+ "forms": {
+ "submit": true,
+ "inputs": true,
+ "toggles": true
+ }
+ },
+ "logLevel": "info",
+ "logPrefix": "Browsersync",
+ "logConnections": false,
+ "logFileChanges": true,
+ "logSnippet": true,
+ "rewriteRules": [],
+ "open": "local",
+ "browser": "default",
+ "cors": false,
+ "xip": false,
+ "hostnameSuffix": false,
+ "reloadOnRestart": false,
+ "notify": true,
+ "scrollProportionally": true,
+ "scrollThrottle": 0,
+ "scrollRestoreTechnique": "window.name",
+ "scrollElements": [],
+ "scrollElementMapping": [],
+ "reloadDelay": 0,
+ "reloadDebounce": 500,
+ "reloadThrottle": 0,
+ "plugins": [],
+ "injectChanges": true,
+ "startPath": "loleaflet/04597b4ec/loleaflet.html?file_path=./test/data/hello-world.odt",
+ "minify": true,
+ "host": null,
+ "localOnly": false,
+ "codeSync": true,
+ "timestamps": true,
+ "clientEvents": [
+ "scroll",
+ "scroll:element",
+ "input:text",
+ "input:toggles",
+ "form:submit",
+ "form:reset",
+ "click"
+ ],
+ "socket": {
+ "socketIoOptions": {
+ "log": false
+ },
+ "socketIoClientConfig": {
+ "reconnectionAttempts": 50
+ },
+ "path": "/browser-sync/socket.io",
+ "clientPath": "/browser-sync",
+ "namespace": "/browser-sync",
+ "clients": {
+ "heartbeatTimeout": 5000
+ }
+ },
+ "tagNames": {
+ "less": "link",
+ "scss": "link",
+ "css": "link",
+ "jpg": "img",
+ "jpeg": "img",
+ "png": "img",
+ "svg": "img",
+ "gif": "img",
+ "js": "script"
+ },
+ "injectNotification": false
+}; \ No newline at end of file