source: trip-planner-front/node_modules/less/lib/less-browser/add-default-options.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[6a3a178]1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4var utils_1 = require("./utils");
5var browser_1 = tslib_1.__importDefault(require("./browser"));
6exports.default = (function (window, options) {
7 // use options from the current script tag data attribues
8 utils_1.addDataAttr(options, browser_1.default.currentScript(window));
9 if (options.isFileProtocol === undefined) {
10 options.isFileProtocol = /^(file|(chrome|safari)(-extension)?|resource|qrc|app):/.test(window.location.protocol);
11 }
12 // Load styles asynchronously (default: false)
13 //
14 // This is set to `false` by default, so that the body
15 // doesn't start loading before the stylesheets are parsed.
16 // Setting this to `true` can result in flickering.
17 //
18 options.async = options.async || false;
19 options.fileAsync = options.fileAsync || false;
20 // Interval between watch polls
21 options.poll = options.poll || (options.isFileProtocol ? 1000 : 1500);
22 options.env = options.env || (window.location.hostname == '127.0.0.1' ||
23 window.location.hostname == '0.0.0.0' ||
24 window.location.hostname == 'localhost' ||
25 (window.location.port &&
26 window.location.port.length > 0) ||
27 options.isFileProtocol ? 'development'
28 : 'production');
29 var dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(window.location.hash);
30 if (dumpLineNumbers) {
31 options.dumpLineNumbers = dumpLineNumbers[1];
32 }
33 if (options.useFileCache === undefined) {
34 options.useFileCache = true;
35 }
36 if (options.onReady === undefined) {
37 options.onReady = true;
38 }
39 if (options.relativeUrls) {
40 options.rewriteUrls = 'all';
41 }
42});
43//# sourceMappingURL=add-default-options.js.map
Note: See TracBrowser for help on using the repository browser.