Code Monkey home page Code Monkey logo

less.rb's Introduction

less.rb

The dynamic stylesheet language.

http://lesscss.org

Build Status

About

These are Ruby bindings for the next generation LESS, which is implemented in JavaScript

For more information, visit http://lesscss.org.

Usage

less.rb exposes the less.Parser constructor to ruby code via Less::Parser. You can instate it context free:

parser = Less::Parser.new

or with configuration options:

parser = Less::Parser.new :paths => ['./lib', 'other/lib'], :filename => 'mystyles.less'

Once you have a parser instantiated, you can parse code to get your AST !

tree = parser.parse(".class {width: 1+1}") # => Less::Tree
tree.to_css #=> .class {\n  width: 2;\n}\n
tree.to_css(:compress => true) #=> .class{width:2;}

Development

This repository contains less.js as a submodule, so to run the tests, you'll need to grab that code as well. To do that, run git submodule update --init from the root directory of the project.

To run the tests:

bundle
rake

License

less.rb is licensed under the same terms as less.js

See lib/js/LICENSE file.

copyright 2011,2012 Charles Lowell

less.rb's People

Contributors

avsej avatar bobthecow avatar bshelton229 avatar codeodor avatar cowboyd avatar gaffneyc avatar grampelberg avatar guilleiguaran avatar hejrobin avatar icco avatar jscheel avatar jsmecham avatar kares avatar karzac avatar matthew342 avatar metaskills avatar ndmarcel avatar nrser avatar rkh avatar rstacruz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

less.rb's Issues

Support Bootstrap V2.3.0

Due to lack of support for Less 1.3, Twitter Bootstrap can no longer be compiled with this gem.

ExecJS

I've created a Ruby Less adapter that uses ExecJS (we're using it at Twitter). The advantage of using ExecJS, is that you don't have to compile v8 (same method that CoffeeScript etc uses).

https://github.com/maccman/less-rb

I'd like to discuss pushing the changes upstream.

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

method `method_missing' called on terminated object

Occasionaly when compiling a large asset, I will get the error:

error evaluating function `font-url`: method `method_missing' called on terminated object (0x00000007901aa8 flags=0x0 klass=0x0)

Other people seem to have this problem:
rubyjs/therubyracer#176
sparklemotion/sqlite3-ruby#60
senchalabs/jsduck#396

@tenderlove Seems to have fixed this in another project with RB_GC_GUARD. See sparklemotion/sqlite3-ruby@dd9ded9

Here's a stack trace with the problem (via less-rails and sprockets)

   error evaluating function `font-url`: method `method_missing' called on terminated object (0x00000007901aa8 flags=0x0 klass=0x0)
   (in /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/app/assets/stylesheets/manifests/communities.css.less)
   at /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/js/lib/less/parser.js:424:31
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/parser.rb:100:in `block in to_css'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/java_script/v8_context.rb:90:in `block in do_lock'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/java_script/v8_context.rb:88:in `call'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/java_script/v8_context.rb:88:in `Locker'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/java_script/v8_context.rb:88:in `do_lock'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/java_script/v8_context.rb:60:in `lock'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/java_script/v8_context.rb:30:in `exec'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/java_script.rb:26:in `exec'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-2.4.0/lib/less/parser.rb:100:in `to_css'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/less-rails-2.4.2/lib/less/rails/template_handlers.rb:19:in `evaluate'
   /tmp/build_5383504b-9067-43c4-b2c0-69570b35b89e/vendor/bundle/ruby/1.9.1/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'

Upgrade less version

It seems like less.js isn't updated/released very often these days. One major issue I see with the current 1.3 release is that it doesn't include a later commit that removes duplicate rules automatically, which means the compile css files are much larger than they need to be.

Is it possible to upgrade the less version used in this gem to this commit that includes the duplicate rule removal?

less/less.js@cb78933

uninitialized constant Less error

I'm now installed less v.2.0.7 gem and found some error occourred.

$ irb

require 'less'
=> true
parser = Less::Parser.new
NameError: uninitialized constant Less

Any idea?

cf. only in ruby-1.8.7 (1.9.2, it works well)

ExecJS

It looks like less.rb is the new official less gem. Would you consider building this lib on top of sstephenson/execjs so other JS runtimes can be used besides therubyracer?

I recently helped someone write a wrapper for this, thisduck/ruby-less-js. Can any of this be incorporated in less.rb?

Update to LESS 2.X

We would like to have LESS 2.X for better source maps and LESS plugins. Is this something that is being planned for a future release.

SVG Data URI with Compression

The test below illustrates an issue compiling SVG data URIs. When compressed (with YUI), the whitespace is collapsed within the markup, and that leads to breakage.

.test {
border-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0,0 24,26"><filter id="dropshadow" height="150%" width="150%"><feGaussianBlur in="SourceAlpha" stdDeviation="2"></feGaussianBlur><feOffset dx="0" dy="1" result="offsetblur"></feOffset><feMerge><feMergeNode></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter><polygon fill="hsl(0, 0%, 100%)" filter="url(#dropshadow)" points="12,3 2,13 12,23 22,13"></polygon></svg>') 30.76923% 29.16667% repeat;
border-width: 0 0 8px;
border-style: solid;
background-clip: padding-box;
margin-bottom: -8px;
    position: relative;
}

Update for less 1.7

We would really like to have less 1.7 to use the new syntax like this:

.test(@block) {
  @block();
}

.test({
  foo: bar;
})

Which would drastically improve our media query handling

dumpLineNumbers option not working

Within Sinatra,

less filename.to_sym, 'dumpLineNumbers' => :comments

Throws

/Users/xxx/.rvm/gems/ruby-1.9.3-p392/gems/less-2.3.1/lib/less/parser.rb in block (2 levels) in parse
Object [object Object] has no method 'resolve' file: parser.rb location: block (2 levels) in parse line: 35

Release a new gem version

It would be nice to have a new version of the gem released, so we
could use Less::Parser#imports from other gems/code.

I currently build my own less gem from sources and it's fine for me,
but I'd like to publicly distribute a gem that depends on
Less::Parser#imports, and I need to wait since I cant specify any
version of less gem with Less::Parser#imports.

Error when parsing nested parentheses

When parsing a less file contains

background-image: url(image-path('form.png'));

it throws an error says: expected ')' got '('

I wonder is it that the nested parentheses or the image-path which causes the problem?

Setting :relativeUrls => false doesn't disable them

In Parser's initialize, to_s is called on each of the passed options.

Less.defaults.merge(options).each do |k,v|
  stringy[k.to_s] = v.is_a?(Array) ? v.map(&:to_s) : v.to_s
end
@parser = Less::JavaScript.exec { Less['Parser'].new(stringy) }

When setting :relativeUrls => false, the value becomes "false" which is a truthy value within JS.

My workaround was to set relativeUrls to an empty string (falsey in JS).

Parser causes memory leak problem

I have a rails app that dynamically compiles less to css based on user inputs and have noticed significant memory leakage that crashes the app after running for about 30 minutes. Using the oink gem, I was able to pinpoint the cause, which is the parse method that creates the Less::Tree. The memory leak occurs even before calling to_css

It seems like something isn't deallocated properly and I just wonder if there's any hook for me to manually destroy everything created by the parse method.

Thanks

lessc doesn't allow minification (-x option)

From lesscss.org, lessc -x myfile.less creates a minified version of the css file. However, passing the -x argument to lessc does results in an error:

/var/lib/gems/1.8/gems/less-2.2.1/bin/lessc:20:in `read': No such file or directory - -x (Errno::ENOENT)
    from /var/lib/gems/1.8/gems/less-2.2.1/bin/lessc:20
    from /usr/local/bin/lessc:19:in `load'
    from /usr/local/bin/lessc:19

Bump-up less.js to v1.3.1

May I please request you to bump up the version of less.js to v1.3.1, which has nifty functions like contrast() and luma() I tried forking the repo and doing it myself, but wasn't able to install the Gem via my own repo properly.

Thanks!

Upgrading to Less 3.x

Hi @cowboyd, I'm a maintainer for Semantic-UI-Rails-LESS and I've been attempting to update that to the latest version of Semantic-UI. Unfortunately they now require Less.js > 3.5 for some calculations to work correctly: https://github.com/Semantic-Org/Semantic-UI/blob/master/RELEASE-NOTES.md#version-241---oct-13-2018

I had a quick look at what it would take to upgrade less.rb to the latest version of Less. It seems that there are some problems with commonjs and lack of support for a few techniques required by the latest version of Less. To be honest, I'm finding the whole thing a bit hard to get my head around.

I was wondering if you had any appetite for looking into this? Is there an alternative to commonjs that could be used (and is maintained?) I assume the main reason for lack of activity on these gems is because of the move to webpacker.

Any help or direction you could give would be fantastic. :)

lessc fails to respect relative @import blocks when invoked with an abs. path

The best way to explain this is to demonstrate it. As noted in this issue in another project which uses lessc provided here, lessc won't respect relative paths with the @import statement when invoked with an absolute path:

$ lessc /home/rfkrocktk/Desktop/myproject/src/myproject/web/static/styles/application.less
/var/lib/gems/1.8/gems/less-2.0.7/lib/less/loader.rb:46:in `error': file 'bootstrap-1.4/bootstrap.less' wasn't found. (Less::ParseError)
    from at Function.importer (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/index.js:114:13)
    from at Object.push (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/parser.js:73:25)
    from at Object.<anonymous> (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/tree/import.js:30:17)
    from at Object.import (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/parser.js:953:28)
    from at $ (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/parser.js:103:24)
    from at Object.directive (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/parser.js:967:29)
    from at $ (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/parser.js:103:24)
    from at Object.primary (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/parser.js:428:80)
    from at $ (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/parser.js:103:24)
    from at Object.parse (/var/lib/gems/1.8/gems/less-2.0.7/lib/less/js/lib/less/parser.js:264:42)
    from /var/lib/gems/1.8/gems/less-2.0.7/lib/less/parser.rb:65:in `parse'
    from /var/lib/gems/1.8/gems/less-2.0.7/lib/less/parser.rb:13:in `calljs'
    from /var/lib/gems/1.8/gems/less-2.0.7/lib/less/parser.rb:27:in `lock'
    from /var/lib/gems/1.8/gems/less-2.0.7/lib/less/parser.rb:25:in `lock'
    from /var/lib/gems/1.8/gems/less-2.0.7/lib/less/parser.rb:12:in `calljs'
    from /var/lib/gems/1.8/gems/less-2.0.7/lib/less/parser.rb:63:in `parse'
    from /var/lib/gems/1.8/gems/less-2.0.7/bin/lessc:22
    from /usr/local/bin/lessc:19:in `load'
    from /usr/local/bin/lessc:19

However, if I invoke it from the current directory, it works fine:

( cd /home/rfkrocktk/Desktop/myproject/src/myproject/web/static/styles && lessc application.less )

Evidently, it's not resolving paths relative to the target file, but relative to the directory in which lessc is invoked.

application.less above simply contains one line:

@import bootstrap-1.4/bootstrap.less

which exists in the bootstrap-1.4 folder in the same directory as application.less.

Allow specifying a load path for Rails 3.1 Asset Pipeline

To work with the Rails 3.1 we need a way to add load paths that the Less::Parser will later use. For example, I am trying to roll the twitter-bootstrap (Less.js powered) into a Rails 3.1 app.

I've put all of the bootstrap (*.less) files in /vendor/assets/twitter-bootstrap/. My application.css manifest looks like

/*
*= require bootstrap
*= require_self
*/

As expected, the /vendor/assets/twitter-bootstrap/bootstrap.less file is found, and the less.rb starts to process it. However, it fails saying file 'reset.less' wasn't found. The bootstrap.less file simply does a bunch of @imports, the first of which is @import "reset.less".

From the digging I've done, I think this is caused by the Less::Parser not being given a load path (:path option) when the asset is being compiled. Following the bouncing ball, the Rails Asset Pipeline uses Sprockets to do that work. Which uses Tilt. I've not dug deep enough into Tilt to know if their Less engine allows providing such a path, nor how (if?) it gets handed down from Rails.

However, if there were some API to allow configuring load paths, then one could always do that via an initializer. Something like:

Less::DefaultOptions[:path] << ...

Please let me know if this is a sane, and clear request. Or if I'm way off the mark. Also, let me know if I can help in any way.

Thanks,
-steven

Is :paths option ignored?

Hi all 😄

Hanami supports Less for assets management. It happens via Tilt.
We received a bug report by @ismaild which seems to be caused by Less. I'm not sure about this, that's why I'm involving you folks.


He is trying to compile a .less file which references a variable defined into another file. It fails to do so via Hanami and via lessrc as well.

The rendering context seems to be scoped to the file itself. I expected Less to take account of all the files of a project. Hence I suspect that :paths option is ignored.

Me and @ismaild are using MRI 2.3.0 with:

  • less (2.6.0)
  • commonjs (0.2.7)
  • therubyracer (0.12.2)
  • libv8 (3.16.14.13)

Thanks in advance for you help. 😄

Make less work on Windows, or use 'node' gem.

Currently requires 'therubyracer', and it does not work on Windows, despite the fact both 'node' and 'therubyracer' are installed.

  gem "execjs"
  gem 'therubyracer', :platforms => :ruby
  gem 'node'

gem "less"
> gem list therubyracer
*** LOCAL GEMS ***

therubyracer (0.11.0beta1 x86-mingw32)

> gem list node
*** LOCAL GEMS ***

node (0.0.2)

Using gem 'therubyracer_for_windows'.
https://github.com/hiranpeiris/therubyracer_for_windows

>rails console
[WARNING] Please install gem 'therubyracer' to use Less.
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- v8 (LoadError)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/java_script/v8_context.rb:2:in `<top (required)>'

Support for node.js as a javascript runtime

We would like to use less for out rails 3.1 application, however because less.rb requires either rubyracer or rihno, I am reluctant to add less-rails(which depends on less.rb) to the application.

Why doesnt it fallback onto node.js when it's available? The way execjs does; I think coffee-rails and sass-rails follow the same approach.

And node is in the PATH on heroku by default.

--compress issue

Why doesn't compress work the same way as node.js version of less?

lessc --compress bootstrap/less/custom.less bootstrap/css/bootstrap.min.css

Results in the following error:

less/Users/bhardin/.rvm/gems/ruby-1.9.3-p0/gems/less-2.2.2/bin/lessc:101:in `write': Broken pipe - <STDOUT> (Errno::EPIPE)
    from /Users/bhardin/.rvm/gems/ruby-1.9.3-p0/gems/less-2.2.2/bin/lessc:101:in `puts'
    from /Users/bhardin/.rvm/gems/ruby-1.9.3-p0/gems/less-2.2.2/bin/lessc:101:in `puts'
    from /Users/bhardin/.rvm/gems/ruby-1.9.3-p0/gems/less-2.2.2/bin/lessc:101:in `<top (required)>'
    from /Users/bhardin/.rvm/gems/ruby-1.9.3-p0/bin/lessc:19:in `load'
    from /Users/bhardin/.rvm/gems/ruby-1.9.3-p0/bin/lessc:19:in `<main>'

Help less-rails extend less.rb/less.js with additional functions.

I want to add additional functions to less.js for less-rails that would parse code like:

.rails {
  asset-path: asset-path("rails.png", image);
  asset-url: asset-url("rails.png", image);
  image-path: image-path("rails.png");
  image-url: image-url("rails.png");
  video-path: video-path("rails.mp4");
  video-url: video-url("rails.mp4");
  audio-path: audio-path("rails.mp3");
  audio-url: audio-url("rails.mp3");
  font-path: font-path("rails.ttf");
  font-url: font-url("rails.ttf");
  javascript-path: javascript-path("rails.js");
  javascript-url: javascript-url("rails.js");
  stylesheet-path: stylesheet-path("rails.css");
  stylesheet-url: stylesheet-url("rails.css");
  asset-data-url: asset-data-url("1x1.png");
}

I have this ticket on less-rails which describes my request for direction.
metaskills/less-rails#1

Error installing less: Python not found!

It says nowhere I need python to run this thing on Windows 7 64-bit. Isn't this dependency supposed to be installed automatically?

C:\Users\jens>gem install less
Building native extensions.  This could take a while...
ERROR:  Error installing less:
        ERROR: Failed to build gem native extension.

C:/Ruby192/bin/ruby.exe extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby192/bin/ruby
Checking for Python...Unable to build libv8: Python not found!


Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/ext/libv8/gem_make.out

Crashes with hardened libc

When requiring less on Fedora 28, this happens:

irb(main):003:0> require 'less'
/usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = v8::Handle<v8::Value>; _Alloc = std::allocator<v8::Handle<v8::Value> >; std::vector<_Tp, _Alloc>::reference = v8::Handle<v8::Value>&; 
``std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
Aborted (core dumped)

This is probably due to the Fedora libc being built with _GLIBCXX_ASSERTIONS.

aspect-ratios not working

I use guard to continuously compile my less files.

When I try to use something like:

287: @media screen and (device-aspect-ratio: 16/9) {
288:        .fullscreen { ... }
289: }

I get the following stacktrace:

> /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/lib/less/parser.rb:67:in `block (2 levels) in parse': Syntax Error on line 287 (Less::ParseError)
    from at Object.parse (/home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/lib/less/js/lib/less/parser.js:436:17)
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/lib/less/parser.rb:65:in `block in parse'
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/lib/less/parser.rb:13:in `block in calljs'
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/lib/less/parser.rb:27:in `block in lock'
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/lib/less/parser.rb:25:in `lock'
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/lib/less/parser.rb:12:in `calljs'
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/lib/less/parser.rb:63:in `parse'
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/gems/less-2.1.0/bin/lessc:22:in `<top (required)>'
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/bin/lessc:19:in `load'
    from /home/arthur/.rvm/gems/ruby-1.9.3-p125@mplayer/bin/lessc:19:in `<main>'

Update to latest less 1.2.1

Are there any plans to update less.rb to use the latest less.js 1.2.1? I naively tried forking the repo and updating the submodule to the latest commit, but that resulted in the following errors (probably because if it was as easy as updating the submodule alone, this gem would've been updated by someone a while ago):

rake aborted!
no such module 'less/index'
/[..]/gems/commonjs-0.2.0/lib/commonjs/environment.rb:15:in `require'
/[..]bundler/gems/less.rb-a3430a098df7/lib/less/loader.rb:21:in `require'
/[..]/bundler/gems/less.rb-a3430a098df7/lib/less.rb:12:in `<module:Less>'
/[..]/bundler/gems/less.rb-a3430a098df7/lib/less.rb:8:in `<top (required)>'
/[..]/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
/[..]/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
...

I ask this because of the problem which was earlier reported in #14 with less.rb and twitter-bootstrap. According to the issue comments, this should be solved in 2.0.8, but I am still getting the same problem.

V8::JSError: [object Object]

After upgrading from 1.x to 2.0.1, I am having issues with compiling my existing less source files. I cannot track down the following error when invoking to_css on a parser object:

V8::JSError: [object Object]
    from at ~/.rvm/gems/ruby-1.9.2-p180@www/gems/less-2.0.1/lib/less/js/lib/less/parser.js:326:38
    from ~/.rvm/gems/ruby-1.9.2-p180@www/gems/less-2.0.1/lib/less/parser.rb:31:in `to_css'
    from (irb):18
    from ~/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'

Since I haven't changed anything in my less source files, I wonder where this error comes from; any ideas? The error is triggered by the following code snippet:

@import "base";

* {
    margin 0;
}

I am using Ruby 1.9.2 on Mac OS X and invoked less as follows:

p = Less::Parser.new(:paths => ["/foo/bar"])
p.parse(IO.read("/foo/bar/style.less")).to_css

where base.less is in the directory /foo/bar.

Better error messages

npm lessc

ParseError: Unrecognised input in /xxx/app/assets/stylesheets/bootstrap/mixins.less on line 578, column 7:
577     .spanX (@index) when (@index > 0) {
578       (~".span@{index}") { .span(@index); }
579       .spanX(@index - 1);

less.rb lessc

/Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/parser.rb:74:in `block (2 levels) in parse': Unrecognised input (Less::Error)
    from at less.Parser.parser.parse.finish (/Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/js/lib/less/parser.js:475:21)
    from at tree.importVisitor.run (/Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/js/lib/less/import-visitor.js:25:22)
    from at less.Parser.parser.parse (/Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/js/lib/less/parser.js:484:22)
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/parser.rb:64:in `block in parse'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/java_script/v8_context.rb:90:in `block in do_lock'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/java_script/v8_context.rb:88:in `call'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/java_script/v8_context.rb:88:in `Locker'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/java_script/v8_context.rb:88:in `do_lock'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/java_script/v8_context.rb:60:in `lock'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/java_script/v8_context.rb:30:in `exec'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/java_script.rb:26:in `exec'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/lib/less/parser.rb:63:in `parse'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bundler/gems/less.rb-fbba0293ba88/bin/lessc:100:in `<top (required)>'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bin/lessc:23:in `load'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bin/lessc:23:in `<main>'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/Vaughan/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'

or in Rails

Unrecognized input
  (in /Users/Vaughan/dev/banky/app/assets/stylesheets/bootstrap_and_overrides.css.less)

`console.log()` not working from javascript?

i'm trying to track down another error (which may or may not be related to #21, can provide more detail if anyone's interested), and can't seem to get console.log() to work from within a .js file, gives me:

Object #<rb::Console> has no method 'log'

should line 64 in

https://github.com/cowboyd/less.rb/blob/f97a4e0c7536ce31acd230842f16bd4be488c2b7/lib/less/loader.rb

be

def log(*msgs)

instead of

def self.log(*msgs)

perhaps?

you can see what i'm talking about with this little tidbit:

require 'v8'

class Console1
  def log(*msgs)
    puts msgs.join(', ')
  end
end

class Console2
  def self.log(*msgs)
    puts msgs.join(', ')
  end
end

ctx = V8::Context.new
ctx['console1'] = Console1.new
ctx['console2'] = Console2.new

ctx.eval 'console1.log("hey!");'
# prints: hey!

ctx.eval 'console2.log("ho!");'
# prints:
# V8::JSError: Object #<rb::Console2> has no method 'log'
#   from at <eval>:1:10
#   from (irb):20
#   from /Users/nrser/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'

doesn't seem to like invoking class methods for context objects from javascript. i haven't looked into this any deeper, and am admittedly quite tired, but changing that line worked for me, so thought i should share.

url(x)'s get repeated into url(url(x))

Using less.rb (v2.0.6).

style.less:

@import url(normalize.css);
background: url(h1.png) no-repeat;

output:

@import url(url(normalize.css));
background: url(url(h1.png)) no-repeat;

less.js (v1.1.4) client-side works properly. Can someone suggest debugging tools please?

Imports from a DB or other dynamic source

Currently the code/api assumes that you want @import statements to load files from the filesystem.

How would you go about supplying it the content for the imports directly? This is required for situations whereby the end user of an app can input less code which gets saved in a database and later processed (think http://codepen.io etc.).

The following is an example of what I'm after, is there any way to achieve this currently?

importer = lambda do |filename|
  LessDocuments.find_by_name(filename).content
end

parser = Less::Parser.new importer: importer

tree = parser.parse('@import "from_db.less"; p { .a-mixin; }')

Is the current implementation even safe in these end-user situations given the filesystem access?

Version 1.3.1

Am I correct that the current version of this gem doesn't include less version 1.3.1?

We need to use the @import-once feature recently introduced to less. Is there a plan to update this repo any time soon?

Thanks!

The runtime detection is incompatible with therubyracer master (currently in beta)

From seyhunak/twitter-bootstrap-rails#321:

I had issues installing twitter-bootstrap-rails on Mountain lion and followed the instructions here: https://github.com/cowboyd/therubyracer/issues/181 to install therubyracer. However now that I've installed things successfully with the following command:

gem 'therubyracer', '0.11.0beta5'
gem 'libv8', '~> 3.11.8'
I am getting an error when I run my rails server:

undefined method `in_javascript?' for #
(in /Users/Lily/Documents/Projects/qwalify/app/assets/stylesheets/qwalify/application.css.less)

lessc file ordering problems

If I invoke lessc with one order of files, the second file content is not included in the output. If i flip the order then both file contents are included:

[aaron@msi-cr620 andreas-2]$ lessc crossroads.less pivotx_light.less  | grep header
.header_content{width:460px;}
.header_content h1{border-top:0px;}
.header_content h1 *{width:460px;}
#header{height:180px;background:#495170 url(images/header_light.jpg);}
[aaron@msi-cr620 andreas-2]$ lessc pivotx_light.less crossroads.less | grep header
#header{height:180px;background:#495170 url(images/header_light.jpg);}

the missing lines are not present in pivotx_light.less, so I think that rules out weird inheritance interactions.

less.rb not compatibale with therubyrhino 1.73.4?

Hey there,

I was using the repositories of kares for a while to have less and less-rails running with jRuby under Windows. That worked quite well. Now that with pull request #26 those changes went into the main repository, I wanted to switch back to the original repositories.

That was when I ended up with an error. I'm using twitter-bootstrap-rails which requires therubyrhino 1.73.4 in its latest version. That seems not to work with latest version of less.rb:

ArgumentError: wrong number of arguments (1 for 0)
  initialize at C:/Ruby/jRuby167/lib/ruby/gems/1.8/gems/therubyrhino-1.73.4/lib/rhino/context.rb:70
  initialize at C:/Ruby/jRuby167/lib/ruby/gems/1.8/bundler/gems/less.rb-c0140aa199a0/lib/less/java_script/rhino_context.rb:22
    instance at C:/Ruby/jRuby167/lib/ruby/gems/1.8/bundler/gems/less.rb-c0140aa199a0/lib/less/java_script/rhino_context.rb:18
  initialize at C:/Ruby/jRuby167/lib/ruby/gems/1.8/bundler/gems/less.rb-c0140aa199a0/lib/less/loader.rb:10
        Less at C:/Ruby/jRuby167/lib/ruby/gems/1.8/bundler/gems/less.rb-c0140aa199a0/lib/less.rb:14
      (root) at C:/Ruby/jRuby167/lib/ruby/gems/1.8/bundler/gems/less.rb-c0140aa199a0/lib/less.rb:9
     require at org/jruby/RubyKernel.java:1042
     require at C:/Ruby/jRuby167/lib/ruby/gems/1.8/bundler/gems/less.rb-c0140aa199a0/lib/less.rb:68
        each at org/jruby/RubyArray.java:1615
     require at C:/Ruby/jRuby167/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66
        each at org/jruby/RubyArray.java:1615
     require at C:/Ruby/jRuby167/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55
     require at C:/Ruby/jRuby167/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119
      (root) at C:/Users/Dennis/RubymineProjects/PS-BuMo/config/application.rb:7
     require at org/jruby/RubyKernel.java:1042
      (root) at C:/Users/Dennis/RubymineProjects/PS-BuMo/config/application.rb:53
         tap at org/jruby/RubyKernel.java:1787
      (root) at C:/Ruby/jRuby167/lib/ruby/gems/1.8/gems/railties-3.2.2/lib/rails/commands.rb:50
     require at org/jruby/RubyKernel.java:1042
      (root) at C:/Ruby/jRuby167/lib/ruby/gems/1.8/gems/railties-3.2.2/lib/rails/commands.rb:6
        load at org/jruby/RubyKernel.java:1068
      (root) at -e:1

Here's my Gemfile:

# Need at least less 2.2.1 and less-rails 2.2.3 to support jRuby!
gem 'less', '~> 2.2.1', :github => 'cowboyd/less.rb', :submodules => true
gem 'less-rails', '~> 2.2.3', :github => 'metaskills/less-rails'

# Using 2.1.0 from rubygems.org somehow doesn't work with jRuby, so fetch in from GitHub
gem 'twitter-bootstrap-rails', :github => 'seyhunak/twitter-bootstrap-rails'

To me that looks like a code error which might be caused by an incompatibility of packages. Do you have any idea how to get that running under jRuby/Win64?

Or is this error probably not caused by less.rb?

Thanks!

error evaluating function `image-url`

Do you know what could be causing this?

+ bundle exec rake assets:precompile
/usr/bin/ruby /var/go/gems/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
error evaluating function `image-url`: undefined method `new' for #<String:0x00000003cb90f0>
  (in /var/lib/go-agent/pipelines/store/tmp/rpmbuild/BUILD/store/app/assets/stylesheets/order.css.less)
at less.Parser.parser.parse.i (/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/js/lib/less/parser.js:421:31)
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/parser.rb:61:in `block in to_css'
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/java_script/v8_context.rb:90:in `block in do_lock'
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/java_script/v8_context.rb:88:in `call'
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/java_script/v8_context.rb:88:in `Locker'
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/java_script/v8_context.rb:88:in `do_lock'
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/java_script/v8_context.rb:60:in `lock'
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/java_script/v8_context.rb:30:in `exec'
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/java_script.rb:26:in `exec'
/var/go/gems/ruby/1.9.1/gems/less-2.3.1/lib/less/parser.rb:61:in `to_css'
/var/go/gems/ruby/1.9.1/gems/less-rails-2.3.3/lib/less/rails/template_handlers.rb:19:in `evaluate'
/var/go/gems/ruby/1.9.1/gems/tilt-1.3.7/lib/tilt/template.rb:77:in `render'
/var/go/gems/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
/var/go/gems/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each'
/var/go/gems/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate'
/var/go/gems/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:12:in `initialize'

Getting WeakRef::RefError: Invalid Reference - probably recycled error

require 'less'
path = '/home/jitu/projects/etc/eventpage/public/themes/event/freelancer/less'
parser = Less::Parser.new :paths => [path], :filename => 'freelancer.less'

This code throws me the following error,

WeakRef::RefError: Invalid Reference - probably recycled
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in `inspect'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in `inspect'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in `inspect'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in `inspect'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in `inspect'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in `inspect'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in `inspect'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in `block in <module:IRB>'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:102:in `inspect_value'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/context.rb:385:in `inspect_last_value'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:665:in `output_value'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:494:in `block (2 levels) in eval_input'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:627:in `signal_status'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:490:in `block in eval_input'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:246:in `block (2 levels) in each_top_level_statement'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:232:in `loop'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:232:in `block in each_top_level_statement'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:231:in `catch'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:231:in `each_top_level_statement'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:489:in `eval_input'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:430:in `block in run'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:429:in `catch'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:429:in `run'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:385:in `start'
	from /home/jitu/.rvm/rubies/ruby-2.4.1/bin/irb:11:in `<main>'

What am I doing wrong? I want to compile less files in a directory dynamically.

Support Less.js 1.4.x

When can we expect support for 1.4.x?

Is there much more to do than update lib/less/js sub-module?

Anyone have a fork already?

I'm going to start working on one now. I really want the extend keyword for nice semantic Twitter Bootstrap.

Cheers!

“Maximum call stack size exceeded” when using Fibers

The following code snippet raises an exception:

require 'less'

Fiber.new do
  ::Less::Parser.new.parse("p { color: red }")
end.resume

The exception:

/var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/parser.rb:55:in `block in initialize': Maximum call stack size exceeded (Less::Error)
	from /var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:90:in `block in do_lock'
	from /var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:88:in `call'
	from /var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:88:in `Locker'
	from /var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:88:in `do_lock'
	from /var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:60:in `lock'
	from /var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:30:in `exec'
	from /var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/java_script.rb:26:in `exec'
	from /var/lib/gems/2.1.0/gems/less-2.6.0/lib/less/parser.rb:55:in `initialize'
	from less_fiber_test_a.rb:4:in `new'
	from less_fiber_test_a.rb:4:in `block in <main>'

The following code snippet works, however:

require 'less'

::Less::Parser.new.parse("p { color: red }")

The exception occurs on Linux (tested on Debian), but not on macOS. Here is a Vagrantfile that sets up a usable machine for testing the example:

Vagrant.configure("2") do |config|
  config.vm.box = "minimal/jessie64"

  config.vm.provision "shell" do |s|
    s.inline = <<-SHELL
      DEBIAN_FRONTEND=noninteractive apt-get -y update
      DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential
      DEBIAN_FRONTEND=noninteractive apt-get -y install openssl
      DEBIAN_FRONTEND=noninteractive apt-get -y install ruby
      DEBIAN_FRONTEND=noninteractive apt-get -y install ruby-dev

      gem install therubyracer
      gem install less
    SHELL
  end
end

Error calling parse in latest version: Entering the V8 API without proper locking in place

After upgrading to the new version (I think I was using 1.x before, which worked correctly), I'm now getting an error when calling this code:

Less::Parser.new.parse(contents).to_css

The error is this:

HandleScope::HandleScope: Entering the V8 API without proper locking in place

And the trace is this:

therubyracer (0.9.0) lib/v8/context.rb:84:in `IsEntered'
therubyracer (0.9.0) lib/v8/context.rb:84:in `enter'
therubyracer (0.9.0) lib/v8/portal.rb:15:in `open'
therubyracer (0.9.0) lib/v8/object.rb:11:in `[]'
less (2.0.3) lib/less.rb:15:in `Parser'
less (2.0.3) lib/less/parser.rb:12:in `initialize'
app/models/stylesheet.rb:52:in `new'

I'm hoping this is not a silly bug in my implementation - is this a known issue with the latest version, perhaps related to therubyracer?

Thanks in advance for your help,
Tim

conflict with the nodejs-less

I'm using debian and after installed this package with lessc i using this software while i want to use the nodejs version.
i have seen that the installer overwrite the /usr/bin/lessc with a symlink on /usr/local/bin/lessc.
it's possible add a check if this symlink exist?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.