skylark-utils

0.9.4 • Public • Published

skylark-utils

An Universal HTML5 Javascript Library, Powerful and Concise.

Features

  • Powerful
    The skylark-utils library provides a comprehensive utility functions, let you to develop a HTML5 applications more simpler and more able to focus on the application logic itself.
  • Concise
    The skylark-utils library pursues a high modularity and high reusability,and was written to be straightforward and easy to read. Naturally, when the bug occurs, the program will be easier to debug.

What's included

The modules contained in the library are listed by category as follows:

base api

  • browser
    This module defines some APIs about brower compatibility.
  • css
    This module defines some APIs about stylesheet and rule.
  • scripter
    This module defines some APIs wrapping script load and unload.

node level api

  • datax
    This module defines some APIs wrapping DOM attribute and property.
  • dnd
    This module defines some APIs wrapping DOM drag and drop.
  • eventer
    This module defines some APIs wrapping DOM event.
  • filer
    This module defines some APIs wrapping local file reand and write.
  • finder
    This module defines some APIs wrapping dom query.
  • fx
    This module defines some APIs wrapping DOM transition and animation.
  • geom
    This module defines some APIs wrapping DOM geometry.
  • mover
    This module defines some APIs wrapping DOM move.
  • noder
    This module defines some APIs wrapping DOM construction.
  • styler
    This module defines some APIs wrapping dom style and class.

visual element api

  • velm
    This module implemented VisuleElement type for wrapping a visual dom node.
    VisualElment provides a number of methods encapsulated from the basic utility module function and supports chain calls.

query api

  • query
    This module provides a similar jquery api, skykark-jquery based on this module provides an API that is fully compatible with jquery, and the code is simpler and more productive.

Dependences

Project Status Description
skylark-langx   v0.9.0 Javascript language extension library

Different builds

build Description
full skylark-utils-all.js included skylark-langx
only utils skylark-utils.js not included skylark-langx
full (development) uncompressed/skylark-utils-all.js included skylark-langx
only utils (development) uncompressed/skylark-utils.js not included skylark-langx

Installation

There are multiple ways to install the skylark-uitls library.

Usage

  • Using the skylark-utils library for a AMD module.
require({
  'paths'{
     'skylark-utils''http://registry.skylarkjs.org/packages/skylark-utils/v0.9.1/skylark-utils' 
  }
}, ['skylark-utils'], function(sutils) {
  // sutils.mover.movable(elm,options) 
});
  • Using the skylark-utils library for a global object named skylark.
<script type="text/javascript" src="http://registry.skylarkjs.org/packages/skylark-utils/v0.9.1/skylark-utils.js"></script>
<script>
// skylarkjs.mover.movable(elm,options);
</script>
  • Using the skylark-utils library for a AMD package.
require({
  'packages'[
    { 'name''skylark-utils', 'location''http://registry.skylarkjs.org/packages/skylark-utils/v0.9.1/skylark-utils/' }
  ]
}, ['skylark-utils/mover'], function(mover) {
  // mover.movable(elm,options);
});

API Document

skyalrk.js application framwork contains the above modules, so the module API documentation can refer to sklark.js's api doc.

Examples

Please access the following site for the execution of each example program under the "/examples" directory.

Building skylark-utils

  • Ensure that Node.js is installed.
  • Run npm gulp -g to ensure gulp is installed.
  • Run npm install to ensure the required dependencies are installed.
  • change current directory to build/, and run gulp. The builds will be placed in the dist/ directory.

License

Released under the MIT

Package Sidebar

Install

npm i skylark-utils

Weekly Downloads

2

Version

0.9.4

License

MIT

Last publish

Collaborators

  • hudaokeji