Skip to content

Commit 2eabf65

Browse files
committed
WURFL Image Tailor (WIT) is now ImageEngine
Other changes since 0.9.x - Adds token support - Adds a flag to switch between "ImageEngine" and "ImageEngine Lite" - Changes the base URLs - Updates unit tests
1 parent 773934c commit 2eabf65

23 files changed

+437
-146
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Changelog
22

3-
All notable changes to `angular-wurfl-image-tailor` will be documented in this file
3+
All notable changes to `image-engine-angular` will be documented in this file
4+
5+
## 1.0.0 - 2015-11-16
6+
7+
### Changed
8+
- WURFL Image Tailor (WIT) is now ImageEngine
9+
10+
### Added
11+
- Token support
12+
- Flag to switch between "ImageEngine" and "ImageEngine Lite"
13+
14+
### Updated
15+
- Base Urls
16+
- Tests
417

518
## 0.9.4 - 2015-03-23
619

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 ScientiaMobile, Inc.
3+
Copyright (c) 2014-2015 ScientiaMobile, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,70 @@
1-
# Angular WURFL Image Tailor [![Build Status](https://travis-ci.org/WURFL/angular-wurfl-image-tailor.png)](https://travis-ci.org/WURFL/angular-wurfl-image-tailor)
1+
# ImageEngine Angular [![Build Status](https://travis-ci.org/WURFL/ImageEngine-angular.png)](https://travis-ci.org/WURFL/ImageEngine-angular)
22

3-
> An AngularJS directive for WURFL Image Tailor (WIT)
3+
> An AngularJS directive for ImageEngine
44
5-
[WURFL Image Tailor](http://wurfl.io/#wit) (WIT) is an automatic image tailor based on WURFL device detection. WURFL will detect the device, and its screen size, resize and optimize the image accordingly.
5+
**WURFL Image Tailor (WIT) is now ImageEngine!**
66

7-
##Features
7+
[ImageEngine](http://web.wurfl.io/#image-engine) is an automatic image optimizer based on WURFL device detection. WURFL will detect the device capabilities, including screen size and image format support, resize and optimize the image accordingly. That's why we call it the ImageEngine.
88

9-
* Add the img-wit directive
10-
* Enable out of the box support for the [WIT URLs](http://wurfl.io/documentation/wit-getting-started.php) to download more images in parallel.
9+
ImageEngine is not only for mobile. ImageEngine supports the emerging Client Hint standard making it the perfect companion for Responsive Images.
10+
11+
Images weight is by far the most important challenge to address to optimize a web page for the plethora of devices on the web today. This is why ImageEngine will instantly give your users a better experience by reducing load time of your page. Not to mention the reduced data cost.
12+
13+
ImageEngine works as a CDN proxy. By referencing the ImageEngine servers and providing the full URL to the original image as a parameter, ImageEngine will identify the device, and its capabilities, and resize and optimize the image accordingly.
1114

1215
## Usage
1316

1417
### Install with bower
15-
* `bower install angular-wurfl-image-tailor --save`
16-
* Include `angular-wurfl-image-tailor.js`. It should be located at `bower_components/src/angular-wurfl-image-tailor.js`
18+
* `bower install image-engine-angular --save`
19+
* Include `image-engine-angular.js`. It should be located at `bower_components/src/image-engine-angular.js`
1720

1821
### Install from source
19-
* [Download Latest Version](https://github.com/WURFL/angular-wurfl-image-tailor/releases) and extract the archive.
20-
* Include `angular-wurfl-image-tailor.js`. It should be located at `archive_path/src/angular-wurfl-image-tailor.js`
22+
* [Download Latest Version](https://github.com/WURFL/ImageEngine-angular/releases) and extract the archive.
23+
* Include `image-engine-angular.js`. It should be located at `archive_path/src/image-engine-angular.js`
2124

2225
### How to use it
2326

24-
* Include the angular-wurfl-image-tailor directive dependency on your angular module:
27+
* Include the image-engine-angular directive dependency on your angular module:
28+
29+
```
30+
var app = angular.module("demoapp", ["image-engine-angular"]);
31+
app.config(function (imgEngConfigProvider) {
32+
imgEngConfigProvider.setToken('your-token');
33+
imgEngConfigProvider.isLite(); // Add this line only for ImageEngine Lite
34+
});
35+
```
2536

26-
`var app = angular.module("demoapp", ["angular-wurfl-image-tailor"]);`
37+
Note: [sign up here](https://scientiamobile.com/imageengine/signup) to get your token
2738

2839
* Include the markup directive on your HTML page, like this:
2940

30-
`<img-wit src="http://yourserver.com/image.png"></img-wit>`
41+
`<img-eng src="http://yourserver.com/image.png"></img-eng>`
3142

3243
or if you want to use interpolation:
3344

34-
`<img-wit src="{{myUrl}}"></img-wit>`
45+
`<img-eng src="{{myUrl}}"></img-eng>`
3546

36-
where {{myUrl}} is the url of the [trusted image](https://docs.angularjs.org/api/ng/service/$sce) to load.
47+
where {{myUrl}} is the url of the [trusted image](https://docs.angularjs.org/api/ng/service/$sce) to load.
3748

3849
## Examples
3950

40-
Check the [WURFL Image Tailor Documentation](http://wurfl.io/documentation/wit-directives.php) for the list of available settings.
51+
Check the [ImageEngine Documentation](http://web.wurfl.io/#image-engine) for the list of available settings.
4152

4253
### Fully Automatic
4354

44-
`<img-wit src="http://yourserver.com/image.png"></img-wit>`
55+
`<img-eng src="http://yourserver.com/image.png"></img-eng>`
4556

4657
### 20% of screen size
4758

48-
`<img-wit src="http://yourserver.com/image.png" pc="20"></img-wit>`
59+
`<img-eng src="http://yourserver.com/image.png" pc="20"></img-eng>`
4960

5061
### Create an image 300px Wide
5162

52-
`<img-wit src="http://yourserver.com/image.png" w="300"></img-wit>`
63+
`<img-eng src="http://yourserver.com/image.png" w="300"></img-eng>`
5364

5465
### Create 200x200px Thumbnails with Black Letterboxes/Pillarboxes
5566

56-
`<img-wit src="http://yourserver.com/image.png" w="200" h="200" m="letterbox_000000_100"></img-wit>`
67+
`<img-eng src="http://yourserver.com/image.png" w="200" h="200" m="letterbox_000000_100"></img-eng>`
5768

5869
## Demo
5970

@@ -68,11 +79,11 @@ $ npm test
6879

6980
## Authors
7081

71-
- [Luca Corbo](https://github.com/lucor)[view contributions](https://github.com//WURFL/angular-wurfl-image-tailor/commits?author=lucor)
82+
- [Luca Corbo](https://github.com/lucor)[view contributions](https://github.com//WURFL/image-engine-angular/commits?author=lucor)
7283
- [All Contributors](../../contributors)
7384

7485
## License
7586

7687
Licensed under the MIT license. (See the LICENSE file)
7788

78-
Copyright &copy; ScientiaMobile, Inc.
89+
Copyright &copy; ScientiaMobile, Inc.

UPGRADE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Upgrade
2+
3+
### From 0.9.x to 1.0
4+
5+
* Install the image-engine-angular module
6+
* Update the directive declaration:
7+
```
8+
var app = angular.module("demoapp", ["image-engine-angular"]);
9+
app.config(function (imgEngConfigProvider) {
10+
imgEngConfigProvider.setToken('your-token');
11+
imgEngConfigProvider.isLite(); // Add this line only for ImageEngine Lite
12+
});
13+
```
14+
15+
* Replace all occurrences of the **img-wit** markup with **img-eng**
16+
17+
Example:
18+
19+
`<img-wit src="http://yourserver.com/image.png"></img-wit>`
20+
21+
to:
22+
23+
`<img-eng src="http://yourserver.com/image.png"></img-eng>`

bower.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"name": "angular-wurfl-image-tailor",
3-
"description": "An AngularJS directive for WURFL Image Tailor (WIT)",
4-
"version": "0.9.4",
5-
"main": "./src/angular-wurfl-image-tailor.js",
2+
"name": "image-engine-angular",
3+
"description": "An AngularJS directive for ImageEngine",
4+
"homepage": "https://github.com/WURFL/ImageEngine-angular",
5+
"version": "1.0.0",
6+
"main": "./src/image-engine-angular.js",
67
"authors": [
78
"Luca Corbo (https://github.com/lucor)"
89
],

demo/index.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,61 @@
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
6-
<title>Angular WURFL Image Tailor</title>
6+
<title>ImageEngine Angular Demo</title>
77

88
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
99

1010
<script src="../bower_components/angular/angular.js"></script>
11-
<script src="../src/angular-wurfl-image-tailor.js"></script>
11+
<script src="../src/image-engine-angular.js"></script>
1212

1313
<script>
14-
angular.module('demo-WIT', ['angular-wurfl-image-tailor']);
14+
var app = angular.module('demo-ImageEngine', ['image-engine-angular']);
15+
app.config(function (imgEngConfigProvider) {
16+
imgEngConfigProvider.setToken('try');
17+
imgEngConfigProvider.isLite();
18+
});
1519
</script>
1620
</head>
1721

18-
<body ng-app="demo-WIT">
22+
<body ng-app="demo-ImageEngine">
1923
<div class="container">
2024
<div class="row">
2125
<h1>Fully Automatic</h1>
2226

2327
<p>
2428
<code>
25-
&lt;img-wit src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG&quot;&gt;&lt;/img-wit&gt;
29+
&lt;img-eng src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG&quot;&gt;&lt;/img-eng&gt;
2630
</code>
2731
</p>
2832

2933
<p>
30-
<img-wit src="http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG"></img-wit>
34+
<img-eng src="http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG"></img-eng>
3135
</p>
3236
</div>
3337
<div class="row">
3438
<h1>20% of screen size</h1>
3539

3640
<p>
3741
<code>
38-
&lt;img-wit src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG&quot; pc=&quot;20&quot;&gt;&lt;/img-wit&gt;
42+
&lt;img-eng src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG&quot; pc=&quot;20&quot;&gt;&lt;/img-eng&gt;
3943
</code>
4044
</p>
4145

4246
<p>
43-
<img-wit src="http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG" pc="20"></img-wit>
47+
<img-eng src="http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG" pc="20"></img-eng>
4448
</p>
4549
</div>
4650
<div class="row">
4751
<h1>Image is 300px Wide</h1>
4852

4953
<p>
5054
<code>
51-
&lt;img-wit src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG&quot; w=&quot;300&quot;&gt;&lt;/img-wit&gt;
55+
&lt;img-eng src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG&quot; w=&quot;300&quot;&gt;&lt;/img-eng&gt;
5256
</code>
5357
</p>
5458

5559
<p>
56-
<img-wit src="http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG" w="300"></img-wit>
60+
<img-eng src="http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG" w="300"></img-eng>
5761
</p>
5862
</div>
5963

@@ -62,12 +66,12 @@ <h1>Create 200x200px Thumbnails with Black Letterboxes/Pillarboxes</h1>
6266

6367
<p>
6468
<code>
65-
&lt;img-wit src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG&quot; w=&quot;200&quot; h=&quot;200&quot; m=&quot;letterbox_000000_100&quot;&gt;&lt;/img-wit&gt;
69+
&lt;img-eng src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG&quot; w=&quot;200&quot; h=&quot;200&quot; m=&quot;letterbox_000000_100&quot;&gt;&lt;/img-eng&gt;
6670
</code>
6771
</p>
6872

6973
<p>
70-
<img-wit src="http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG" w="200" h="200" m="letterbox_000000_100"></img-wit>
74+
<img-eng src="http://upload.wikimedia.org/wikipedia/commons/8/82/2011_Trampeltier_1528.JPG" w="200" h="200" m="letterbox_000000_100"></img-eng>
7175
</p>
7276
</div>
7377
</div>

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var gulp = require('gulp');
2-
var karma = require('karma').server;
2+
var karma = require('karma').Server;
33
var bower = require('gulp-bower');
44

55
require('./test/angular-1.2/gulpfile');

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function(config) {
1717

1818
'bower_components/angular/angular.js',
1919
'bower_components/angular-mocks/angular-mocks.js',
20-
'src/angular-wurfl-image-tailor.js',
20+
'src/image-engine-angular.js',
2121
'test/**/*Spec.js'
2222
],
2323

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"name": "angular-wurfl-image-tailor",
3-
"version": "0.9.3",
4-
"description": "An AngularJS directive for WURFL Image Tailor (WIT)",
2+
"name": "image-engine-angular",
3+
"version": "1.0.0",
4+
"description": "An AngularJS directive for ImageEngine",
5+
"homepage": "https://github.com/WURFL/ImageEngine-angular",
56
"author": "Luca Corbo (https://github.com/lucor)",
67
"maintainers": [
78
"Luca Corbo (https://github.com/lucor)"
@@ -11,34 +12,33 @@
1112
],
1213
"license": "MIT",
1314
"bugs": {
14-
"url": "https://github.com/WURFL/angular-wurfl-image-tailor/issues"
15+
"url": "https://github.com/WURFL/ImageEngine-angular/issues"
1516
},
1617
"repository": {
1718
"type": "git",
18-
"url": "https://github.com/WURFL/angular-wurfl-image-tailor.git"
19+
"url": "https://github.com/WURFL/ImageEngine-angular.git"
1920
},
2021
"keywords": [
2122
"angularjs",
2223
"wurfl",
23-
"wit",
24-
"wurfl image tailor",
24+
"ImageEngine",
2525
"webcomponent"
2626
],
2727
"devDependencies": {
2828
"chai": "^1.9.1",
2929
"gulp": "^3.8.11",
30-
"gulp-bower": "0.0.10",
31-
"gulp-karma": "0.0.4",
32-
"http-server": "^0.6.1",
33-
"karma": "^0.12",
34-
"karma-chai": "^0.1.0",
35-
"karma-mocha": "^0.1.4",
36-
"karma-phantomjs-launcher": "^0.1.4"
30+
"gulp-bower": "^0.0.10",
31+
"http-server": "^0.6",
32+
"karma": "^0.13",
33+
"karma-chai": "^0.1",
34+
"karma-mocha": "^0.1",
35+
"karma-phantomjs-launcher": "^0.1",
36+
"mocha": "^2.3.4"
3737
},
3838
"scripts": {
3939
"postinstall": "bower install",
4040
"prestart": "npm install",
41-
"start": "http-server -p 8000",
41+
"start": "http-server -p 9999",
4242
"pretest": "npm install",
4343
"test": "./node_modules/.bin/gulp",
4444
"test-single-run": "./node_modules/.bin/gulp test"

src/angular-wurfl-image-tailor.js

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)