jQuery externs file for 1.10.x or 2.0.x? - google-closure-compiler

As far as I can tell there is no official jQuery externs file for the 1.10 or 2.0 branch of jQuery. My question is, am I going to run into trouble using the jQuery 1.9 externs file with the 1.10 and 2.0 versions?

//Update
As #John pointed out, you are better off using the 1.9 externs until 1.10 is available.
If you are missing externs for other libraries then jQuery, and you are not interested in type checking, you could try providing a library itself as an extern for closure compiler.
--externs some-library.js
and suppressing the warnings:
--jscomp_off=externsValidation
However, be careful with this method. After switching to VERBOSE mode I run into problems like this one.

Related

INI directive ‘mbstring.func_overload’ is deprecated since PHP 7.2

Using PHP Compatibility Checker, got this warning
INI directive 'mbstring.func_overload' is deprecated since PHP 7.2
is there any way to handle this warning?
It all might depend on how your code is using this. PHP.net highly discourages using this feature. If you are using an older library that uses this value. Then you should look at updating the library and see if they've fixed it. If the library or your code that is just accessing this value (e.g. with ini_get('mbstring.func_overload')), then that's not really a problem, though the compatibility parser will still call it out as an issue. This was called out to the Symfony maintainers, and they just dismissed it.

How to Compile project based on Closure Library + OpenLayers 3 + Proj4js

I am building an app using Closure Library, OL3 and Proj4js.
Now I want to compile project with ADVANCED_OPTIMIZATIONS in closure compiler, I don't want to load all OL3 build and all closure library scripts but only those I use.
I read something about externs and exports on closure library site, but still I don't know how to use it.
Can anyone tell me where I can find good tutorial about this or tell me how to do it?
Sorry for my bad English.
The question is quite old, but still: There is now a tutorial explaining how to compile your application together with OpenLayers:
http://openlayers.org/en/master/doc/tutorials/closure.html

Sass or Compass without ruby?

Is there a way to use Sass or Compass or anything like that without Ruby?
I have been looking around google and this site and can't find anything, any help would be appreciated. Thank you
Sass was originally written for Ruby, but now they've created libSass which is a C/C++ port of the Sass engine, which makes it easier to integrate the engine into an IDE or another language. At this point, you can use the Sass engine in Ruby, Node.js, Python, PHP, Java, .NET and others. For more information, visit libSass. Also, your IDE might have a plugin which would support Sass, without the need of ruby by using the libSass.
The original answer below may or may not apply to your situation (depends on whether or not your language has implemented support for libSass or not). I decided to leave it the way it is for archive reasons.
Sass (requires Ruby)
Sass is written in Ruby, so you’ll need Ruby installed as well.
Taken from sass's site
Compass (requires Ruby, as it's based on SASS)
Compass is an open-source CSS authoring framework which uses the Sass stylesheet language to make writing stylesheets powerful and easy.
Taken from compass's site
Less (written in js, requires node.js or less.js included in the page)
LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions. LESS runs on both the client-side (Chrome, Safari, Firefox) and server-side, with Node.js and Rhino. Taken from Less's site
These are the main processors out there that I know of.
You may write your own parser/port for any another language of choice.
In other words, no you can't use sass/compass without having Ruby because the program itself (sass & compass) IS written in Ruby. So you'll definitely need it in order to run it.
Actually there is a library that provides binding for Node.js to libsass, the C version of the Sass: https://npmjs.org/package/node-sass
It allows you to natively compile .scss files to css at incredible speed without Ruby installed.
To install just run:
npm install node-sass
And there is also a Grunt extension if needed: https://github.com/sindresorhus/grunt-sass (this is what I've been looking for in this question)
Find out more at: https://github.com/andrew/node-sass
It's true that the question is not clear enough, but i'll try to address some issues. There are other CSS pre-processors that don't rely on Ruby (two coming to my mind right now are Less, which i've used and liked, but not as powerful as Sass, and Stylus, which i haven't used, both based on JavaScript), but as you're specifically asking about Sass+Compass, and as i'm still looking for the same answer, i'll talk about that.
#JamundFerguson said:
Is there a way to compile Sass without Ruby? Depends.
There is
Sass is a pre-processing language. There's a compiler built in Ruby for it and anyone can write a compiler in any language. There's a C implementation of a Sass compiler called libsass which can be used on any language that allows to import C libs. It's the library used by node-sass, which is a compiler built in Node.js, which I didn't tried yet and don't know how it could work and if it's ready for production use. It may be a question of time for Compass to be ported (maybe you end up doing that?) and so we can have a compiler which doesn't depends on the Ruby gem (currently, there's a node-compass module that does relies on the Ruby gem).
Other languages
So far i've mentioned the possibility for a Node.js compiler, which, as you may know, it's a JavaScript environment, being the language of the web and my language of choice. But you didn't specified which language you would like the compiler to be written into. I think there may be compilers built in many languages, for example, #EricMeyer mentioned a Python compiler. Maybe he's using pyScss? That seems to have built-in support for Compass. But then you need a Python environment. So the thing is: you'll need some environment for a compiler unless you run natively compiled binaries. (Less has less.js which can be included on the page to run client-side and avoid the compiling step, but it's not meant for using it on production.)
Native apps
I've worked for a year with CodeKit, which does very well, compiles Sass/Compass, Less, Stylus and template languages like Haml, Slim, Jade, etc. Rebuilds your assets when they change automatically and you see the changed on your browser immediately. The only thing that i didn't liked was that when moving to a different computer, installing CodeKit, checking out project and trying to use it, i had to reconfigure the project settings, which i had to remember so i could get to a build like the one i made in the other computer. Also i started working with a team, and they had also to configure the project with the same settings (sometimes not having the same project config lead to ugly inconsistencies) and also members of the team using Ubuntu couldn't use it. That's why i started to think on making a command-line tool to build projects and discovered Grunt immediately, and fell in love with it.
As #Dave mentioned, there's Scout and also there's LiveReload, but haven't used them.
Conclusion
Conclusion is i have not a strong conclusion. I'm still looking for the same answer, but i hope this answer sheds a little bit of light on the status of compiling Sass/Compass outside of the Ruby environment.
Just a little bit of an update on this, you can use SCSS/SASS files and generate the correct files on the fly without installing Ruby by using a program called Scout.
Scout has its own self contained ruby environment and is coded in java so make sure you java is up to date before using. Linky here.
Regards :)
You can actually parse sass without ruby, you can use node-sass.
details here: https://github.com/andrew/node-sass
If this is for .NET, there is now a wrapper for libsass. Available from Nuget.
Adobe Brackets (free, open source) can compile LESS, SASS and Stylus when the files are changed, and update styles during live preview, you just need to install required extensions from the extension manager.
Get Brackets and enjoy !
Edit: As other questions suggest node-sass is also a good option if you have nodejs already installed.
macOS users can install Dart Sass by running:
$ brew install sass/sass/sass
Windows users can install Dart Sass by running:
$ choco install sass
More info:
https://github.com/sass/dart-sass

How to set collapseProperties in an Ant build file for Closure Compiler?

I've seen some reference to a collapseProperties option when compiling with the Google Closure Compiler, but I don't understand how to set it in an Ant build file.
Will someone please provide an example? Or some documentation that has examples?
Also, if I'm compiling with compilationLevel="advanced", is collapseProperties already true?
"collapseProperties" is one of standard optimization passes enabled in ADVANCED mode. It is not available as a separate command-line option or as part of the ANT support that is part of the compiler's source tree. It is configurable using the Java API, should you wish to change it.
It basically attempts to remove objects used as namespaces, simplifying further analysis and making additional optimization possible.
if you are using advanced mode collapsed is true by default.

Rcpp upgrading legacy code questions

I am taking over a project which involves upgrading to the latest version of Rcpp and thus I have to upgrade all the old style API calls (which is compatible with the CLassic version I believe). As there is no full API documentation, I am having to do this by trial and error and noting any "undefined reference" errors on linking and then looking through the vignettes/examples. The compile works fine but the errors arise on linking against \inst\libs\RLink.dll. I have manged to convert a lot of the code (mainly using Rcpp::List to extract and pack incoming and outgoing function parameters) but I simply cannot get equivalents for the following:
Rprintf or Rf_error and forward_exception_to_r.
R_NilValue
Rf_install
I am using Code::Blocks 10.05 IDE with RTools installed and Mingw64 referenced explicitly in the toolchain with the GNU GCC Compiler selected. I'd be grateful for any heads up. Thanks.
edit:
I do have #include and before that and (there was a series of errors that were occuring because I had included iostream before Rcpp, which was strange.
Can you please provide some concrete examples, maybe even on the rcpp-devel list? The porting approach works, I too have ported legacy code from the 'classic' Rcpp API, and so have others on the list.
But you do not have to port. The short vignette in the RcppClassic package has details on how to use it in case you want to maintain the old API.

Resources