Commit Graph

1664 Commits

Author SHA1 Message Date
Matthew Dean
809dc509f3 Arbitrary (non-falsey) values returned from functions are cast as Anonymous nodes 2017-01-06 19:39:23 -08:00
Matthew Dean
ede0587368 Revert contrast changes in 2.7.1 2017-01-04 17:50:59 -08:00
Matthew Dean
68ea31dc89 Line and column # reporting for Node errors 2017-01-01 12:58:09 -08:00
Matthew Dean
43ab0b8722 Added error test for unparseable @plugin with better error messaging 2016-12-31 20:04:51 -08:00
Matthew Dean
49cbe520f6 Migrate JSCS and JSHint to ESLint and fix various ESLint styling errors 2016-12-31 20:03:46 -08:00
Matthew Dean
fda4565e8d Replace "return {}" statement in plugins with explicit registerPlugin() function (more logical) 2016-12-31 11:53:53 -08:00
Matthew Dean
9f7c0aa563 Merge branch '3.x' of https://github.com/less/less.js into 3.x
* '3.x' of https://github.com/less/less.js:
  Refactor test/index.js removing code duplicates
  Move error formatting logic to LessError
  Remove test for inferring css import based on path
  Allow less imports of paths like 'dir/css'
2016-12-23 21:31:26 -08:00
Matthew Dean
4251946e83 Merge pull request #2955 from maxbrunsfeld/less-imports-of-files-named-css
Allow less imports of paths like 'dir/css'
2016-12-21 15:27:32 -08:00
Matthew Dean
c82202cfb8 Update inline comments 2016-11-21 13:57:59 -08:00
Kirill Rogovoy
b23ffe1e4b Move error formatting logic to LessError 2016-10-12 11:15:31 +03:00
Max Brunsfeld
77fde7eb78 Allow less imports of paths like 'dir/css' 2016-08-23 14:03:26 -07:00
Barnaby Colby
efaec8370d Fixed sourcMapBasepath bug as the option had no affect on the sourceMapURL. 2016-08-04 08:51:19 +00:00
Matthew Dean
abb5375acb Fix JSLint and JSCS errors 2016-07-19 01:38:54 -07:00
Matthew Dean
39150d513a Simplified API on less object
e.g. "less.Ruleset()" instead of "new less.tree.Ruleset()"

Auto-casting of string values into nodes for AtRule, Declaration, Selector, Value
e.g. "less.Selector('&.a')" instead of "new tree.Selector(new tree.Element(new tree.Combinator('&'), '.a'))"
2016-07-19 01:30:34 -07:00
Matthew Dean
a38f8a1eb7 Added property accessors - performance issue solved by re-tooling value parsing
i.e. All values are anonymous strings until "queried"
- Unlike original PR, no change in existing test output for un-referenced properties
- unused variables would theoretically result in a tiny improvement in parsing time
2016-07-18 14:28:32 -07:00
Matthew Dean
3d9f8433d1 Remove Node / Browserify 'path' module dependency 2016-07-16 20:45:46 -07:00
Matthew Dean
a3e43acb26 Pass function registry to plugin install()
- Create Anonymous nodes from non-null (but non-Node) function return values
- Allow empty Anonymous nodes to collapse on output
2016-07-15 16:05:20 -07:00
Matthew Dean
9b0c8abb54 Reduced lookups and type checking on object properties 2016-07-15 16:03:02 -07:00
Matthew Dean
1136a9c050 3.0.0-pre.2 2016-07-14 12:29:11 -07:00
Matthew Dean
e309bf67a2 Added the concept of inherited index / fileInfo for nodes 2016-07-14 02:07:15 -07:00
Matthew Dean
d5803515d5 Allow minimum Less version for plugins to be a string 2016-07-13 02:33:28 -07:00
Matthew Dean
16c80efa61 Fix directive / rule shims 2016-07-13 01:38:30 -07:00
Matthew Dean
1ecb327a67 Merge branch 'feature/@plugin' into 3.x
* feature/@plugin:
  All tests passing for @plugin - Inline JavaScript disabled by default - Deprecated "preprocessor" option removed (preprocessor plugins still valid)
  Plugin loader set up for lessc, node, and browser
2016-07-12 22:35:16 -07:00
Matthew Dean
ad57737ce0 All tests passing for @plugin
- Inline JavaScript disabled by default
- Deprecated "preprocessor" option removed (preprocessor plugins still valid)
2016-07-12 22:26:39 -07:00
Matthew Dean
270fd097c9 Plugin loader set up for lessc, node, and browser 2016-07-06 13:26:25 -07:00
Matthew Dean
52e9b5e4fe Rename Directive -> AtRule & Rule -> Declaration
- Added tree shim for old node types and plugin visitor shim to upgrade node visitors to new node types
2016-07-01 20:53:01 -07:00
Matthew Dean
c73f50e2c7 Added plugin function "setContext()". Allows the context from where the plugin is declared to be passed into the plugin after it is evaluated. (Useful for creating function calls / vars dynamically.) 2016-07-01 15:08:48 -07:00
Matthew Dean
777d95f11b Add plugin cache to plugin manager
- Add visitor iterator so that visitors can be added while visiting (such as plugins in nested scope)
2016-07-01 14:44:54 -07:00
Matthew Dean
27492a71ef Rename extensions back to plugins 2016-07-01 14:43:34 -07:00
Matthew Dean
1df9443cf4 Add create() and getLocalFunctions() to function registry so it can be used for plugins 2016-07-01 14:43:00 -07:00
Matthew Dean
a1c08857e4 Add AbstractPluginLoader to create a cross-platform abstraction for loading plugins by name 2016-07-01 14:39:52 -07:00
Matthew Dean
bd14f14709 Rename @plugin to @use extensions 2016-06-24 20:36:00 -07:00
Matthew Dean
7a5e073e90 Small bug fix: index is passed to Comment node but never assigned 2016-05-10 19:58:34 -07:00
Matthew Dean
d3e1531370 v2.7.1 HOTFIX 2016-05-09 13:38:37 -07:00
Matthew Dean
36edeaa787 Fix input start position for @media blocks 2016-05-08 00:15:16 -07:00
Matthew Dean
fbd000c194 Revert "Make sourcemap generation a bit faster"
This reverts commit 470af20f64.
2016-05-07 19:01:09 -07:00
Matthew Dean
b76db1799d v2.7.0 2016-05-07 18:35:07 -07:00
Natalie Weizenbaum
657972cc41 Update my name. 2016-05-05 14:17:07 -07:00
Max Mikhailov
9db686ad47 polish abstractFileManager.extractUrlParts comments 2016-05-04 22:55:23 +02:00
Andrey Taritsyn
cb1f0f50bb Fix invalid extraction of the host part from URL 2016-05-04 21:30:51 +03:00
Matthew Dean
d07a9b6cc6 Fix for #2841 - Fix reversion for "color-like" keywords. 2016-04-22 16:31:56 -07:00
Matthew Dean
ff94626eca Merge branch 'master' of https://github.com/less/less.js
* 'master' of https://github.com/less/less.js:
  Remove unreachable code
  Fix typos found by codespell
  Fix AST to include text for single line comments
  bin/lessc: Make sure path.dirname gets passed strings
  Add some more URLs for less-docs builds
  Add master branch path for less-docs builds
2016-04-08 13:25:13 -07:00
Louis Traynard
981cb95b1b Remove unreachable code
This line is unreachable. This is not just about code style, it actually also raises a compilation error when I try to include less.js in a TypeScript project (the TypeScript compiler performs some checks on the input .js files as well).
2016-04-04 16:38:18 +02:00
Matthew Dean
848c8acff7 Fix to function imports - only flag known nodes, empty function results allowed 2016-04-01 22:38:58 -07:00
Stefan Weil
bf279b36be Fix typos found by codespell
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-01 12:01:40 +02:00
Timothy
7853edcc96 Fix AST to include text for single line comments 2016-03-31 16:14:29 -04:00
Matthew Dean
bcc8ced8b0 Merge pull request #2754 from Synchro/master
Update contrast function and tests, fixes #2743
2016-03-15 09:52:40 -07:00
Matthew Dean
6ae3582a8c Merge branch 'master' into root-functions
* master:
  Make sourcemap generation a bit faster
2016-03-15 09:30:10 -07:00
Matthew Dean
d094d7e8fb Merge pull request #2834 from Medium/nick-sourcemap
Make sourcemap generation a bit faster
2016-03-15 09:05:11 -07:00
Matthew Dean
d061bdb2f1 Added tests for valid and invalid nodes returned by functions 2016-03-05 14:31:13 -07:00