background preloader

Closure Tools

Closure Tools
What is the Closure Compiler? The Closure Compiler is a tool for making JavaScript download and run faster. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. How can I use the Closure Compiler? You can use the Closure Compiler as: An open source Java application that you can run from the command line. To get started with the compiler, see "How do I start" below. What are the benefits of using Closure Compiler? Efficiency. Related:  Outils, scripts et divers choses utiles

iScroll This script has been superseded by iScroll 4 . This page is kept for historical reasons . Project info Project state: ACTIVE (code is actively updated) Last code update: 2010.10.08 – v3.7.1 Device compatibility: iPhone/Ipod touch >=2.0, Android >=1.5, iPad >=3.2. Support development If this script saved your day or you wish to support iScroll and other scripts development you may consider sending some funds via PayPal. Overview iScroll was born because mobile webkit (on iPhone, iPod, Android and Pre) does not provide a native way to scroll content inside a fixed width/height element. Luckily mobile webkit offers a powerful set of hardware accelerated CSS properties that can be used to simulate the missing functionality, so the iScroll development started… But there’s no rose without thorn. How to use First of all we need to prevent the default behavior of standard touch events. iScroll takes two parameters. <div id="wrapper"><div id="scroller"><ul><li>... That’s it. Accepted options are:

Underscore.js ie7-js - Project Hosting on Google Code IE7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6. Current version: 2.1 beta4. IE7.js Upgrade MSIE5.5-6 to be compatible with MSIE7. IE8.js Upgrade MSIE5.5-7 to be compatible with MSIE8. You do not need to include IE7.js if you are using IE8.js IE9.js Upgrade MSIE5.5-8 to be compatible with modern browsers. You do not need to include IE7/IE8.js if you are using IE9.js The script only fixes images named: *-trans.png If you want the fix to apply to all PNG images then set a global variable as follows: var IE7_PNG_SUFFIX = ".png"; You must set this variable before including the IE7.js script. <script src="IE8.js">IE7_PNG_SUFFIX=".png";</script> The suffix will ignore query string parameters. var IE7_PNG_SUFFIX = ":"; By default, the PNG will be stretched (this simulates tiling). You may link directly to these files if you wish:

YUI Compressor According to Yahoo!'s Exceptional Performance Team, 40% to 60% of Yahoo!'s users have an empty cache experience and about 20% of all page views are done with an empty cache (see this article by Tenni Theurer on the YUIBlog for more information on browser cache usage). This fact outlines the importance of keeping web pages as lightweight as possible. In terms of code minification, the most widely used tools to minify JavaScript code are Douglas Crockford's JSMIN, the Dojo compressor and Dean Edwards' Packer. The goal of JavaScript and CSS minification is always to preserve the operational qualities of the code while reducing its overall byte footprint (both in raw terms and after gzipping, as most JavaScript and CSS served from production web servers is gzipped as part of the HTTP protocol). Documentation: Detailed description of the YUI Compressor and how to use it. How does the YUI Compressor work? Using the YUI Compressor from the command line Additional notes Support & Community

Welcome to Jinja2 — Jinja2 2.7-dev documentation Jinja2 is a modern and designer friendly templating language for Python, modelled after Django’s templates. It is fast, widely used and secure with the optional sandboxed template execution environment: <title>{% block title %}{% endblock %}</title><ul>{% for user in users %} <li><a href="{{ user.url }}">{{ user.username }}</a></li>{% endfor %}</ul> Features: sandboxed executionpowerful automatic HTML escaping system for XSS preventiontemplate inheritancecompiles down to the optimal python code just in timeoptional ahead of time template compilationeasy to debug. Additional Information If you can’t find the information you’re looking for, have a look at the index or try to find it using the search function:

Brian Ford The AngularJS documentation is great for getting started and for looking up specific API calls. However, it doesn't really tell you how to organize and manage your app as it grows to tens or hundreds of thousands of lines of code. I've collected here some of my observations and best practices for how to manage your sprawling application. Don't Write a Huge App The best advice about huge apps is not to make them. Organization Probably the biggest question with large apps is where to put all of that code. Directories This is the typical folder layout that I recommend: root-app-folder ├── index.html ├── scripts │ ├── controllers │ │ └── main.js │ │ └── ... │ ├── directives │ │ └── myDirective.js │ │ └── ... │ ├── filters │ │ └── myFilter.js │ │ └── ... │ ├── services │ │ └── myService.js │ │ └── ... │ ├── vendor │ │ ├── angular.js │ │ ├── angular.min.js │ │ ├── es5-shim.min.js │ │ └── json3.min.js │ └── app.js ├── styles │ └── ... └── views ├── main.html └── ... Files Modules Dependencies Models

JavaScript: A Survey of the Language Douglas Crockford www.crockford.com © 2002 Douglas Crockford This document is an introduction to the JavaScript Programming Language for professional programmers. It is a small language, so if you are familiar with other languages, then this won't be too demanding. JavaScript is not Java. They are two very different languages. JavaScript is a regular language which won't take much time to learn. When JavaScript was first introduced, I dismissed it as being not worth my attention. JavaScript was developed by Brendan Eich at Netscape as the in-page scripting language for Navigator 2. This document describes ECMAScript Edition 3 (aka JavaScript 1.5). JavaScript contains a small set of data types. Boolean has two values: true and false. Number is 64-bit floating point, similar to Java's double and Double. String is a sequence of zero or more Unicode characters. 'This is a string.' "Isn't this a string? 'A' // The character A "" // An empty string var s = "Hello World!" Objects var myHashtable = {};

uglify-js UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit. Note: uglify-js@3 has a simplified API and CLI that is not backwards compatible with uglify-js@2.Documentation for UglifyJS 2.x releases can be found here.uglify-js only supports JavaScript (ECMAScript 5).To minify ECMAScript 2015 or above, transpile using tools like Babel. Install First make sure you have installed the latest version of node.js (You may need to restart your computer after this step). From NPM for use as a command line app: npm install uglify-js -g From NPM for programmatic use: npm install uglify-js uglifyjs [input files] [options] UglifyJS can take multiple input files. If no input file is specified, UglifyJS will read from STDIN. If you wish to pass your options before the input files, separate the two with a double dash to prevent input files being used as option arguments: uglifyjs --compress --mangle -- input.js Command line options -h, --help Print usage information. CLI source map options Example: fs

jQuery Mobile | jQuery Mobile

Related: