Socket
Socket
Sign inDemoInstall

egjs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egjs - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

.editorconfig

3

package.json
{
"name": "egjs",
"version": "1.2.0",
"version": "1.3.0",
"description": "Set of UI interactions, effects and utilities components library.",

@@ -43,2 +43,3 @@ "outputname": "eg",

"grunt": "^0.4.5",
"grunt-browser-sync": "^2.2.0",
"grunt-contrib-clean": "^0.7.0",

@@ -45,0 +46,0 @@ "grunt-contrib-concat": "^0.5.1",

# egjs
[![Build Status](https://travis-ci.org/naver/egjs.svg?branch=master)](https://travis-ci.org/naver/egjs) [![Test coverage](https://codeclimate.com/github/naver/egjs/badges/coverage.svg)](https://codeclimate.com/github/naver/egjs/coverage)
'egjs' is a set of UI interactions, effects and utilities components library using jQuery, which brings easiest and fastest way to build web application in your way.
egjs is a jQuery-based JavaScript library consisting of UI interactions, effects, and utilities, which brings easiest and fastest way to build a web application in your way.
> - **Demo**: http://codepen.io/egjs/
> - **Online API Documentation**
- Latest : https://naver.github.io/egjs/latest/doc
- For specific version : `https://naver.github.io/egjs/[VERSION]/doc`
* Usage Examples of egjs: http://codepen.io/egjs
* API Documentation
- Latest: https://naver.github.io/egjs/latest/doc
- Specific version: https://naver.github.io/egjs/[VERSION]/doc
* [한글 readme](README-ko.md)
- [한국어(Korean) readme](https://github.com/naver/egjs/blob/master/README-ko.md)
### Components
* **eg** : Collection of base utilities, which are used in diverse egjs components.
* **eg.Class** : Provide class methods to make object oriented programming style code.
* **eg.Component** : Base class utility to help develop modules in component.
* **eg.MovableCoord** : Easily get computed coordinate values according user actions.
* **eg.Flicking** : Implement flicking interaction UI.
* **eg.Visible** : Check whether elements are within viewport.
* **eg.infiniteGrid** : Make card style UI arranged in grid style in infinite way.
The following is a list of egjs components.
* eg: As a default namespace, it is a collection of base utilities for egjs, which is used in diverse components.
- [API Documentation](http://naver.github.io/egjs/latest/doc/eg.html)
* eg.Class: A module that enables developing classes in object-oriented programming style.
- [API Documentation](http://naver.github.io/egjs/latest/doc/eg.Class.html)
* eg.Component: A base class utility that manages events and options in modules.
- [API Documentation](http://naver.github.io/egjs/latest/doc/eg.Component.html)
* eg.MovableCoord: A module that transforms user coordinates into logical coordinates in a virtual coordinate system.
- [API Documentation](http://naver.github.io/egjs/latest/doc/eg.MovableCoord.html)
- [Usage Examples](http://naver.github.io/egjs/demo/movableCoord/), [Usage Examples (CodePen)](http://codepen.io/collection/AKpkGW/)
* eg.Flicking: A module that implements flicking.
- [API Documentation](http://naver.github.io/egjs/latest/doc/eg.Flicking.html)
- [Usage Examples](http://naver.github.io/egjs/demo/flicking/), [Usage Examples (CodePen)](http://codepen.io/collection/ArxyLK/)
* eg.Visible: A module that checks if an element is visible in the base element or viewport.
- [API Documentation](http://naver.github.io/egjs/latest/doc/eg.Visible.html)
- [Usage Examples (CodePen)](http://codepen.io/collection/Ayrabj/)
* eg.infiniteGrid: A module that arranges infinite card elements including content on a grid.
- [API Documentation](http://naver.github.io/egjs/latest/doc/eg.InfiniteGrid.html)
- [Usage Examples](http://naver.github.io/egjs/demo/infiniteGrid/), [Usage Examples (CodePen)](http://codepen.io/collection/DPYEww/)
### jQuery Extensions
egjs provides methods and events extended from jQuery.
#### Methods
* **persist** : Provide cache interface to handle persisted data among history navigation.
* **css** : Help to use css properties without browser's vendor prefix.
* **animate** : Support transform and 3d acceleration extending jQuery's animate.
* **pause/resume** : Pause and resume jQuery's animate and delay.
The following is a list of methods extended from jQuery.
* persist() method: Stores the current state of a webpage into a key in JSON.
- [API Documentation](http://naver.github.io/egjs/latest/doc/jQuery.html#persist)
- [Usage Examples (CodePen)](http://codepen.io/collection/XOLpog/)
* prefixCss() method: Enables to add CSS vendor prefixes when you use jQuery that does not support them.
* animate() method: A method extended from the jQuery animate() method. It supports CSS transform property and 3D acceleration.
- [API Documentation](http://naver.github.io/egjs/latest/doc/jQuery.html#animate)
* pause() and resume() methods: Pauses and resumes animation executed by the jQuery animate() method.
- [API Documentation](http://naver.github.io/egjs/latest/doc/jQuery.html#pause)
- [Usage Examples (CodePen)](http://codepen.io/collection/XOEpOw)
#### Events
* **rotate** : Trigger event detecting device orientation.
* **scrollEnd** : Trigger event detecting end of scroll's position.
## Download
For latest version, check out - https://github.com/naver/egjs/tree/gh-pages/latest/dist
The following is a list of events extended from jQuery.
### Uncompressed (for development)
- Latest : https://naver.github.io/egjs/latest/dist/eg.js
- For specific version : `https://naver.github.io/egjs/[VERSION]/dist/eg.js`
* rotate: An event that detects the orientation of the mobile device.
- [API Documentation](http://naver.github.io/egjs/latest/doc/jQuery.html#event:rotate)
- [Usage Examples (CodePen)](http://codepen.io/collection/nLYYqP/)
* scrollend: An event that detects the scrolling to bottom of the page.
- [API Documtation](http://naver.github.io/egjs/latest/doc/jQuery.html#event:scrollEnd)
- [Usage Examples (CodePen)](http://codepen.io/collection/Dxeemo/)
### Compressed (for production)
- Latest : https://naver.github.io/egjs/latest/dist/eg.min.js
- For specific version : `https://naver.github.io/egjs/[VERSION]/dist/eg.min.js`
## Downloads and Installation
### from CDN
- cdnjs : https://cdnjs.com/libraries/egjs
- jsDelivr : https://www.jsdelivr.com/projects/egjs
In order to use egjs, you should download the JavaScript files or install it using Bower or npm.
### with Bower
### For development (Uncompressed)
You can download the uncompressed files for development version from the following locations:
* Latest: http://naver.github.io/egjs/latest/dist/eg.js
* Specific version: http://naver.github.io/egjs/[VERSION]/dist/eg.js
### For production (Compressed)
You can download the compressed files for production version from the following locations:
* Latest: http://naver.github.io/egjs/latest/dist/eg.min.js
* Specific version: http://naver.github.io/egjs/[VERSION]/dist/eg.min.js
### Using CDN
To create a link to a file provided over CDN, you must check the file URL in the CDN service.
* cdnjs: https://cdnjs.com/libraries/egjs
* jsDelivr: https://www.jsdelivr.com/projects/egjs
### Installation with Bower
If you do not have Bower installed, install it using npm as follows:
```bash
# Intall bower if not (admin account required)
$ npm install bower -g
```
# then intall egjs using bower
The following code shows how to install egjs using Bower.
```bash
$ bower install egjs
```
### Installation with npm
## Browser support
The following code shows how to install egjs using npm.
|Internet Explorer|Chrome|FireFox|Safari|iOS|Android|
```bash
$ npm install egjs
```
## Supported Browsers
The following table shows browsers supported by egjs.
|Internet Explorer|Chrome|Firefox|Safari|iOS|Android|
|---|---|---|---|---|---|
|7+|Latest|Latest|Latest|7+|2.3+ (except 3.x)|
- Coverage could be vary among components. For more details check out API documentation.
|7+|Latest|Latest|Latest|7+|2.3+(except 3.x)|
## Dependency library
> Supported browser types and versions may vary depending on modules. For more information, see API documentation.
egjs has following dependencies.
## Dependency
egjs has the dependencies for the following libraries:
|[jQuery](https://jquery.com/)|[Hammer.js](http://hammerjs.github.io/)|[Outlayer](https://github.com/metafizzy/outlayer/)|
|---|---|---|---|
|1.7.0+ |2.0.4+|1.4.1+|
- Except `jQuery`, others are not mandatory. Required dependencies may differ according components.
|[jQuery](https://jquery.com/) (required)|[Hammer.JS](http://hammerjs.github.io/)|
|---|---|---|
|1.7.0+ |2.0.4+|
> Except jQuery, library dependencies may vary depending on modules. For more information, see API documentation.
## How to use?
Load jQuery first, then load egjs (also available on [cdnjs](https://cdnjs.com/libraries/egjs))
## How to Use
Let egjs load after jQuery loads.
```html
<!-- load jQuery -->
...
<!-- Load jQuery -->
<script src="bower_components/jquery/jquery.js"></script>
<!-- load egjs packaged with all dependencies (Hammer.js and Outlayer) -->
<!-- load from your local installation -->
<!-- Load egjs packaged with all dependencies (Hammer.js) -->
<!-- Load from your local installation -->
<script src="bower_components/egjs/dist/pkgd/eg.pkgd.min.js"></script>
<!-- or load from CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/egjs/1.1.0/pkgd/eg.pkgd.min.js"></script>
<!-- Or load from CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/egjs/1.3.0/pkgd/eg.pkgd.min.js"></script>
...
```
> NOTE: For more details on separate dependency file inclusion, check out [Download and Using egjs](https://github.com/naver/egjs/wiki/Download-and-Using-egjs#how-to-use) wiki page.
> **Note**
> For more information on loading dependency files except jQuery, see the "[Download and Using egjs](https://github.com/naver/egjs/wiki/Download-and-Using-egjs#how-to-use)" page on GitHub Wikis.
All done, ready to start using egjs!
egjs has `eg` namespace and can be used as below example.
You need to add the namespace, "eg", to use the egjs components as shown in the example below.

@@ -105,25 +161,32 @@ ```javascript

## How to start developing egjs?
For anyone interested to develop egjs, follow below instructions.
## egjs Development
### Steps for setting project
#### 1. Install grunt-cli and bower
For anyone interested to develop egjs, follow the instructions below.
### Development Environment
#### 1. Install grunt-cli and Bower
Install grunt-cli and Bower globally.
```bash
# Install grunt-cli and bower globally (admin account required)
$ npm install grunt-cli -g # grunt-cli
$ npm install bower -g # bower
$ npm install grunt-cli -g # Install grunt-cli
$ npm install bower -g # Install Bower
```
#### 2. Clone from repo and install dependency modules
#### 2. Clone the repository and install dependencies
Clone the egjs depository and install the Bower and npm dependency modules.
```bash
# make directory and enter
# Create and move a folder.
$ mkdir egjs && cd egjs
# get the clone from the repo
# Clone a repository.
$ git clone https://github.com/naver/egjs.git
# install bower dependency modules
# Install the Bower dependency module.
$ bower install
# install node dependency modules
# Install the node dependency module.
$ npm install

@@ -133,24 +196,32 @@ ```

#### 3. Build
Run grunt build task to build.
Use Grunt to build egjs.
```bash
$ grunt build
```
If the build successfully complete :
- `eg.js` and `eg.min.js` are created in `dist` folder.
- API documentations are created in `doc` folder, and can be accessed `doc/index.html`.
Two folders will be created after complete build is completed.
- **dist** folder: Includes the **eg.js** and **eg.min.js** files.
- **doc** folder: Includes API documentation. The home page for the documentation is **doc/index.html**.
### Test
After development has been done from your branch, `must run unit test` before push.
Running `grunt test` task, jshint, qunit and istanbul coverage task will be run.
Once you create a branch and done with development, you must perform a test using the "grunt test" command before you push code to a remote repository.
```bash
$ grunt test
```
- Coverage results can be shown immediately and also can be found at `./report/index.html`.
Running a "grunt test" command will start [JShint](http://jshint.com/), [JSCS](http://jscs.info/), [QUnit](https://qunitjs.com/), and [istanbul](https://gotwarlost.github.io/istanbul/).
* JShint and JSCS: Performs static checking and code style checking.
* QUnit: Performs unit tests of egjs.
* istanbul: Measures test coverage. The test results can be verified once the Grunt task is completed. Or you can use the **./report/index.html** file to verify them.
## Issues
If you find a bug, please report us via [issues page](https://github.com/naver/egjs/issues).
## Bug Report
If you find a bug, please report it to us using the [Issues](https://github.com/naver/egjs/issues) page on GitHub.
## License
egjs is released under the [MIT](http://naver.github.io/egjs/license.txt) license.
egjs is released under the [MIT license](http://naver.github.io/egjs/license.txt).

@@ -179,2 +250,2 @@ ```

[![Analytics](https://ga-beacon.appspot.com/UA-70842526-5/egjs/readme)](https://github.com/naver/egjs)
[![Analytics](https://ga-beacon.appspot.com/UA-70842526-5/egjs/readme)](https://github.com/naver/egjs)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc