Commit Graph

51 Commits

Author SHA1 Message Date
Luke Page
e45ec8a31e refactoring - add a env type to better organise its properties 2013-01-23 19:07:29 +00:00
Luke Page
3f9d01ac2f optional dependencies should be loaded in a try-catch so they are actually optional 2013-01-11 22:29:46 +00:00
Daniel Stockman
8d1eaa2ae8 Optionally use mkdirp to ensure output destination directory exists. Fixes #1099 2013-01-10 22:24:59 +00:00
Richard Brown
fb60990145 Add a lint option to lessc 2013-01-05 15:29:47 +00:00
Luke Page
eb5c9fbf5d Relative url's option for node lessc 2012-12-28 15:25:15 +00:00
Salim Bensiali
e59a93b5fd Relative URLs in LESS files should be relative to the file that defines them.
It is up to the parser and compiler to rewrite them when those files are
imported by another LESS file.

- Modified and added test cases for import and import-once rules
- Fixed difference between client side and server side handling of relative urls
- Added a -rootpath option to lessc to specify another base path for the url
  rewriting. By default, rootpath=''
2012-12-27 20:40:16 +00:00
Daniel Stockman
a62e8f6c00 Log output file written when verbose.
This helps CI builds keep a record of exactly what happened, among other things.
2012-12-12 23:00:16 +00:00
Daniel Stockman
092f81d452 Back-compat for existsSync in directory check
fs.existsSync was added in 0.6, and path.existsSync was added in 0.4.2:

http://nodejs.org/docs/v0.4.2/api/path.html#path.existsSync
2012-12-12 23:00:15 +00:00
Daniel Stockman
f4105114f0 lessc: Defend against missing output directories
If an output specifies a destination inside a directory that doesn't exist, it blows up unceremoniously. Let's avoid that.

Also, uses modern fs.writeFileSync instead of manual open/write/closeSync.
2012-12-12 23:00:14 +00:00
Simone Deponti
959e22f5ff Added media query support.
* env.dumpLineNumbers was being lost when doing "offline" compilation
   (within node.js)
 * Added documentation for the changed options
 * --line-numbers now takes a parameter
   (either "comments", "mediaquery" or "all")
 * The system can now again output mediaqueries for FireLESS
 * Moved comments tests in debug/comments, will duplicate
   for mediaquery and for "all"

Everything is still utterly broken though, tests still fail.
2012-10-07 12:16:03 +01:00
Vsevolod Vlasov
ccfa7402a1 Added ruleset source line number dumping support for debugging purposes. 2012-10-07 12:16:01 +01:00
Luke Page
2d8ede3436 remove process.exit calls as they do not guarentee a flushed stdout 2012-08-15 21:14:06 +01:00
Matt
fb21a897f6 Add some content to lessc help
Added some details to lessc and extracted a printUsage method.

Fixes #817
2012-08-15 18:53:35 +01:00
Matt
5132c71a5b Fix error output and extract a helper object for lessc related methods
- Fixed a bug, which prevents colors from being set in error messages.
- Created a helper object for lessc methods and moved the stylize function
  into it. Changed test/less-test.js and lib/less/index.js to use new methods.
- Removed duplicate definitions of the stylize function.
2012-08-15 18:53:35 +01:00
Luke Page
861b63ce08 close the file written to in lessc. Fixes #570 2012-08-12 17:39:20 +01:00
Alexis Sellier
236f16b124 Allow '@import' directives in any selector
Add --strict-imports option to disable for perf
reasons.
2012-02-28 17:20:11 +01:00
Christian Zeller
a15dd33574 Improved Windows path support in lessc 2011-12-12 10:37:47 +01:00
Alexis Sellier
62e7840a6e Merge pull request #494 from jmcclell/patch-1
Adding support for absolute paths on Windows.
2011-12-10 05:05:07 -08:00
Alexis Sellier
c2d61e75de Merge branch 'master' of https://github.com/Glench/less.js into yui 2011-12-10 13:52:07 +01:00
Garth Williams
d5bb283a62 Updated lessc require from sys to util for nodejs 0.6.* 2011-12-04 20:54:46 +01:00
Glen Chiacchieri
e57fd2383e Add yui css compressor on lessc for better compression. Call with lessc
--yui-compressor. If -x and --yui-compressor are present, it will only
use the YUI compressor.
2011-12-02 17:33:12 -05:00
Jason McClellan
866b6b483c Adding support for absolute paths on Windows. 2011-11-28 08:37:41 -05:00
Alexis Sellier
13455c0651 remove require.paths from scripts 2011-11-14 11:46:37 +01:00
Alexis Sellier
301b448782 Merge pull request #340 from steevel/master
Read less-content from stdin
2011-08-22 05:50:08 -07:00
cloudhead
041f119b13 add '--no-color' option 2011-08-22 08:20:05 -04:00
cloudhead
8d9fc38cc1 add '-I' argument to add include paths 2011-08-22 08:19:49 -04:00
Steeve Lennmark
f62b311aa2 Add support for reading lessdata from stdin by using - as source target. 2011-08-05 15:03:06 +02:00
Justin Hileman
aaedf96564 Add an --include-path option to lessc.
This adds an optional `--include-path=foo` argument to the command line lessc script. Paths are evaluated relative to the current working directory, so paths like `../foo`, `./bar` and `baz` all work just like you'd expect.

Multiple paths can be supplied by separating them with colons, e.g. `--include-path=foo:../bar:/baz`

The basedir of the input file is always in the include path because that just makes sense.
2011-05-04 06:18:37 +08:00
Felix Geisendörfer
fe134b2759 Fix bin/lessc
One more time, had to replace fs.open call with fs.readFile.
2010-10-13 14:09:00 +08:00
cloudhead
72e7c34921 silent option. pass options through writeError 2010-06-18 19:51:29 -04:00
cloudhead
29a894231a fix error message when no filename, also try to print stack 2010-06-18 19:44:48 -04:00
cloudhead
7aef90c4c8 proper exit codes on errors, and use stderr 2010-06-18 19:23:56 -04:00
cloudhead
edcbd3ffbe fix lessc optimization parsing 2010-06-16 18:25:40 -04:00
cloudhead
8c5530c6a7 better error handling 2010-06-11 21:46:24 -04:00
cloudhead
7b4ebef2a4 (bin) add compress and optimization options 2010-06-11 20:38:44 -04:00
Steve Losh
fab6b4c43d fix bin/lessc to work with relative and absolute paths 2010-06-12 06:27:35 +08:00
cloudhead
652f1110d3 improve error reporting, include filename 2010-06-04 13:28:38 -04:00
cloudhead
0b30fe48c9 tweaks to bin/lessc 2010-06-01 21:48:13 -04:00
cloudhead
cdeb9ea29a nvm compatibility 2010-05-05 01:00:00 -04:00
cloudhead
1b9d4e472d moved index.js to lib/less 2010-05-05 00:23:45 -04:00
cloudhead
e1062efa98 Overhaul of the error system
The parse() function no longer assumes the command-line is the output
device. We use less.writeError in node.js.
2010-04-25 19:39:21 -04:00
cloudhead
aa13ee058b use puts instead of writeError, which was removed 2010-04-21 10:11:34 -04:00
cloudhead
0267de4fac removed lib/ext, moved lib/less.js to /index.js, moved Array/find to tree.find 2010-03-27 02:26:55 -04:00
cloudhead
2b4b0cbdf6 made parser reentrant for import support 2010-03-21 19:17:37 -04:00
cloudhead
9a583ca6ca no need to pass starting values to toCSS() anymore 2010-03-19 20:14:35 -04:00
cloudhead
f6cf5f245c Fix bin/lessc to use less.js and callback-style 2010-03-19 18:04:56 -04:00
cloudhead
3175652f76 oops, fixed command line tool 2010-03-05 19:17:32 -05:00
cloudhead
78f9767c6a improved command line tool 2010-03-05 15:33:36 -05:00
cloudhead
1e16d0233c ParseErrors dont raise an exception anymore, we just set parser.error to the value of the error 2010-02-27 14:14:52 -05:00
cloudhead
7944ce092b print to stdout if no output file was specified [lessc] 2010-02-26 22:28:32 -05:00