source: trip-planner-front/node_modules/less/lib/less-node/lessc-helper.js@ ceaed42

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

initial commit

  • Property mode set to 100644
File size: 6.3 KB
Line 
1// lessc_helper.js
2//
3// helper functions for lessc
4var lessc_helper = {
5 // Stylize a string
6 stylize: function (str, style) {
7 var styles = {
8 'reset': [0, 0],
9 'bold': [1, 22],
10 'inverse': [7, 27],
11 'underline': [4, 24],
12 'yellow': [33, 39],
13 'green': [32, 39],
14 'red': [31, 39],
15 'grey': [90, 39]
16 };
17 return "\u001B[" + styles[style][0] + "m" + str + "\u001B[" + styles[style][1] + "m";
18 },
19 // Print command line options
20 printUsage: function () {
21 console.log('usage: lessc [option option=parameter ...] <source> [destination]');
22 console.log('');
23 console.log('If source is set to `-\' (dash or hyphen-minus), input is read from stdin.');
24 console.log('');
25 console.log('options:');
26 console.log(' -h, --help Prints help (this message) and exit.');
27 console.log(' --include-path=PATHS Sets include paths. Separated by `:\'. `;\' also supported on windows.');
28 console.log(' -M, --depends Outputs a makefile import dependency list to stdout.');
29 console.log(' --no-color Disables colorized output.');
30 console.log(' --ie-compat Enables IE8 compatibility checks.');
31 console.log(' --js Enables inline JavaScript in less files');
32 console.log(' -l, --lint Syntax check only (lint).');
33 console.log(' -s, --silent Suppresses output of error messages.');
34 console.log(' --strict-imports Forces evaluation of imports.');
35 console.log(' --insecure Allows imports from insecure https hosts.');
36 console.log(' -v, --version Prints version number and exit.');
37 console.log(' --verbose Be verbose.');
38 console.log(' --source-map[=FILENAME] Outputs a v3 sourcemap to the filename (or output filename.map).');
39 console.log(' --source-map-rootpath=X Adds this path onto the sourcemap filename and less file paths.');
40 console.log(' --source-map-basepath=X Sets sourcemap base path, defaults to current working directory.');
41 console.log(' --source-map-include-source Puts the less files into the map instead of referencing them.');
42 console.log(' --source-map-inline Puts the map (and any less files) as a base64 data uri into the output css file.');
43 console.log(' --source-map-url=URL Sets a custom URL to map file, for sourceMappingURL comment');
44 console.log(' in generated CSS file.');
45 console.log(' --source-map-no-annotation Excludes the sourceMappingURL comment from the output css file.');
46 console.log(' -rp, --rootpath=URL Sets rootpath for url rewriting in relative imports and urls');
47 console.log(' Works with or without the relative-urls option.');
48 console.log(' -ru=, --rewrite-urls= Rewrites URLs to make them relative to the base less file.');
49 console.log(' all|local|off \'all\' rewrites all URLs, \'local\' just those starting with a \'.\'');
50 console.log('');
51 console.log(' -m=, --math=');
52 console.log(' always Less will eagerly perform math operations always.');
53 console.log(' parens-division Math performed except for division (/) operator');
54 console.log(' parens | strict Math only performed inside parentheses');
55 console.log(' strict-legacy Parens required in very strict terms (legacy --strict-math)');
56 console.log('');
57 console.log(' -su=on|off Allows mixed units, e.g. 1px+1em or 1px*1px which have units');
58 console.log(' --strict-units=on|off that cannot be represented.');
59 console.log(' --global-var=\'VAR=VALUE\' Defines a variable that can be referenced by the file.');
60 console.log(' --modify-var=\'VAR=VALUE\' Modifies a variable already declared in the file.');
61 console.log(' --url-args=\'QUERYSTRING\' Adds params into url tokens (e.g. 42, cb=42 or \'a=1&b=2\')');
62 console.log(' --plugin=PLUGIN=OPTIONS Loads a plugin. You can also omit the --plugin= if the plugin begins');
63 console.log(' less-plugin. E.g. the clean css plugin is called less-plugin-clean-css');
64 console.log(' once installed (npm install less-plugin-clean-css), use either with');
65 console.log(' --plugin=less-plugin-clean-css or just --clean-css');
66 console.log(' specify options afterwards e.g. --plugin=less-plugin-clean-css="advanced"');
67 console.log(' or --clean-css="advanced"');
68 console.log('');
69 console.log('-------------------------- Deprecated ----------------');
70 console.log(' -sm=on|off Legacy parens-only math. Use --math');
71 console.log(' --strict-math=on|off ');
72 console.log('');
73 console.log(' --line-numbers=TYPE Outputs filename and line numbers.');
74 console.log(' TYPE can be either \'comments\', which will output');
75 console.log(' the debug info within comments, \'mediaquery\'');
76 console.log(' that will output the information within a fake');
77 console.log(' media query which is compatible with the SASS');
78 console.log(' format, and \'all\' which will do both.');
79 console.log(' -x, --compress Compresses output by removing some whitespaces.');
80 console.log(' We recommend you use a dedicated minifer like less-plugin-clean-css');
81 console.log('');
82 console.log('Report bugs to: http://github.com/less/less.js/issues');
83 console.log('Home page: <http://lesscss.org/>');
84 }
85};
86// Exports helper functions
87for (var h in lessc_helper) {
88 if (lessc_helper.hasOwnProperty(h)) {
89 exports[h] = lessc_helper[h];
90 }
91}
92//# sourceMappingURL=lessc-helper.js.map
Note: See TracBrowser for help on using the repository browser.