Skip to content
Michal Moravec edited this page Jan 16, 2014 · 1 revision

How to follow less.js?

With a new release of less.js we need to implement the same to iless project and port corresponding changes to PHP.

What has been changed in less.js?

To list what has been changed you can use the git diff command or use Github to display it in a more friendly way.

Command line usage

You have to clone the less.js repository to your machine. The command:

$ git diff v1.5.0 v1.6.0

will list all changes between those two tags.

Github usage

To list commits between tags v1.5.1 and v1.6.0 you can just navigate your browser to the self describing url: https://github.com/less/less.js/compare/v1.5.1...v1.6.0

You can see number of commits, file changes between and the commit overviews.

Do the work

Now it's time to check each commit and verify if the commit relates to iless code. If no, you can jump over it :)

If yes, create a new local branch from the develop branch which will be used to commit your changes.

Implement the change and run tests to verify that nothing is broken. (If you are not sure about the implementation or you need to discuss it, please create new issue and describe it there.)

Mark the commit with a descriptive message and insert the original commit hash from less.js like less/less.js@<<commitHash>>, so others can see that this commit is already implemented (See the syntax description).

Create a pull request to be merged to develop branch.

When is everything done, we can merge develop to master branch and create the corresponding release.

Notes on differences

Objects

  • less.js: var node = new(tree.Anonymous)(value);
  • iless: $node = new ILess_Node_Anonymous($value);

Creating a copy of the environment object

  • less.js: var newEnv = new tree.parseEnv(env);
  • iless: $newEnv = ILess_Environment::createCopy($env);

Other

  • The less.js directory lib/less/tree relates to lib/ILess/Node.
  • The file less.js functions.js which contains builtin functions relates to FunctionRegistry.php file (ILess_FunctionRegistry class).

Questions and ideas?

  • Do you have any questions, ideas or found a better way? Something is missing? Please create a new issue.