Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.
/ zero Public archive

Zero began as a fork of Zepto but its inner workings have changed to be compatible with all modern browsers including IE with performance improvements.

License

Notifications You must be signed in to change notification settings

charsleysa/zero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zero.js – a minimalist JavaScript library

Zero is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery or Zepto.js, you already know how to use Zero.

Zero began as a fork from Zepto.js but has had its internals restructured to be compatible with all modern browsers.

Zero also has performance improvements while keeping the small size.

Zero.js is licensed under the terms of the MIT License.

Building

Build Status

Check out Zero's source code and use the build commands.

You will need Node.js installed on your system.

$ npm install
$ npm run-script dist

The resulting files are:

  1. dist/zero.js
  2. dist/zero.min.js
  3. dist/zero.big.js
  4. dist/zero.big.min.js

If you install CoffeeScript globally, you can run make directly:

$ coffee make dist
$ MODULES="zero event data ..." ./make dist

Pre-compiled files

A pre-compiled version of Zero is available at jsDelivr.

This contains all the modules that are ticked in the Zero modules section below.

A new big pre-compiled version of Zero is also available. The modules that are ticked in the big column are included.

<!-- Uncompressed -->
<script type="text/javascript" src="//cdn.jsdelivr.net/zero.js/latest/zero.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/zero.js/latest/zero.big.js"></script>

<!-- Minified -->
<script type="text/javascript" src="//cdn.jsdelivr.net/zero.js/latest/zero.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/zero.js/latest/zero.big.min.js"></script>

Zero modules

Zero modules are individual files in the "src/" directory.

module default big description
zero Core module; contains most methods
event Event handling via on() & off()
detect Provides $.os and $.browser information (Deprecated)
fx The animate() method
fx_methods Animated show, hide, toggle, and fade*() methods.
ajax XMLHttpRequest Level 2 functionality
form Serialize & submit web forms
callbacks Zero equivalent of jQuery $.Callbacks
deferred Zero equivalent of jQuery $.Deferred
assets Experimental support for cleaning up iOS memory after removing image elements from the DOM.
data A full-blown data() method that stores data directly on to objects in memory.
selector Experimental jQuery CSS extensions support for functionality such as $('div:first') and el.is(':visible').
touch Fires tap– and swipe–related events on touch devices. Works with both touch events and mspointer events.
stack Provides andSelf & end() chaining methods

Contributing

Get in touch:

Write documentation

Zero currently has no documentation available. Since the API is based off Zepto.js and jQuery, you can use most of their documentation to learn how to use Zero. Please note that most of the API's marked deprecated in the Zepto.js documentation may not be available in Zero.

Report a bug

  1. Check if the bug is already fixed in the master branch since the last release.
  2. Check existing issues. Open a new one, including exact browser & platform information. For better formatting of your report, see GitHub-flavored Markdown.

Running tests

You will need to install PhantomJS.

If you use Node.js it will automatically be installed as a dependancy when you run the npm install command.

To run the automated tests:

$ npm test

To run a test server, which you can hit with your browsers and devices:

$ npm start

Go to http://your-ip-address:3000/ on your browser and follow the instructions. For your convenience test failures and exceptions will be reported to the the console you started the test server in (as well as the browser console if available).

About

Zero began as a fork of Zepto but its inner workings have changed to be compatible with all modern browsers including IE with performance improvements.

Resources

License

Stars

Watchers

Forks

Packages

No packages published