Skip to content

Commit 41ed012

Browse files
2 parents 2dcf561 + ebc3f93 commit 41ed012

File tree

9 files changed

+2735
-1068
lines changed

9 files changed

+2735
-1068
lines changed

.npmignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.DS_Store
2+
.coveralls.yml
3+
.idea
4+
node_modules
5+
bin
6+
example
7+
test
8+
spec
9+
src
10+
npm-debug.log
11+
bower_components
12+
bower.json
13+
gruntfile.js
14+
karma.conf.js
15+
test-main.js
16+
coverage*

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
# Image Map Resize
2-
[![Bower version](https://badge.fury.io/bo/image-map-resizer.svg)](http://badge.fury.io/bo/image-map-resizer)
32
[![npm version](https://badge.fury.io/js/image-map-resizer.svg)](http://badge.fury.io/js/image-map-resizer)
4-
[![CDNJS version](https://img.shields.io/cdnjs/v/image-map-resizer.svg)](https://cdnjs.com/libraries/image-map-resizer)
5-
![license](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)
6-
3+
![license](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)
4+
[![Blazing](https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg?style=flat)](https://twitter.com/acdlite/status/974390255393505280)
5+
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.me/davidjbradshaw)
76

87
*This is a simple library that makes HTML Image Maps responsive, so that they automagically stay scaled to the size of the image they are attached to. It detects the window being resized and updates the co-ordinates of the image map accordingly.*
98

109
*This library can be used with or without jQuery.*
1110

1211
### Native JS Usage
1312

14-
Inclued the [imageMapResizer.min.js](https://raw.github.com/davidjbradshaw/imagemap-resizer/master/js/imageMapResizer.min.js) script then add the following call to the bottom of your page:
13+
Include the [imageMapResizer.min.js](https://raw.github.com/davidjbradshaw/imagemap-resizer/master/js/imageMapResizer.min.js) script then add the following call to the bottom of your page:
1514

1615
```js
1716
imageMapResize();
@@ -22,7 +21,7 @@ Optionally you can pass a CSS selector that returns a collection of map tags, fo
2221

2322
### jQuery Usage
2423

25-
Inclue [jQuery](http://jquery.com) and the [imageMapResizer.min.js](https://raw.github.com/davidjbradshaw/imagemap-resizer/master/js/imageMapResizer.min.js) script and then add the following call to the bottom of your page:
24+
Include [jQuery](http://jquery.com) and the [imageMapResizer.min.js](https://raw.github.com/davidjbradshaw/imagemap-resizer/master/js/imageMapResizer.min.js) script and then add the following call to the bottom of your page:
2625

2726
```js
2827
$('map').imageMapResize();
@@ -48,7 +47,7 @@ https://wordpress.org/plugins/add-image-maps/
4847
Version 1.0 of this project is optimised for IE9 and above. If you still require support for IE8 then please use [V0.6.x](https://github.com/davidjbradshaw/image-map-resizer/tree/v0.6.x). Both versions are functionally equivalent.
4948

5049
### License
51-
Copyright © 2014-15 [David J. Bradshaw](https://github.com/davidjbradshaw).
50+
Copyright © 2014-19 [David J. Bradshaw](https://github.com/davidjbradshaw).
5251
Licensed under the [MIT license](http://opensource.org/licenses/MIT).
5352

5453
[![NPM](https://nodei.co/npm/image-map-resizer.png)](https://nodei.co/npm/image-map-resizer/)

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "image-map-resizer",
3-
"version": "1.0.7",
3+
"version": "1.0.10",
44
"homepage": "https://github.com/davidjbradshaw/image-map-resizer",
55
"authors": [
66
"David J. Bradshaw <dave@bradshaw.net>"

gruntfile.js

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
11
/*global module:false*/
22
module.exports = function(grunt) {
3-
43
// show elapsed time at the end
5-
require('time-grunt')(grunt);
4+
require('time-grunt')(grunt)
65

76
// load all grunt tasks
8-
require('load-grunt-tasks')(grunt);
9-
7+
require('load-grunt-tasks')(grunt)
108

119
// Project configuration.
1210
grunt.initConfig({
1311
pkg: grunt.file.readJSON('package.json'),
1412

1513
meta: {
16-
banner: '/*! Image Map Resizer (imageMapResizer.min.js ) - v<%= pkg.version %> - ' +
14+
banner:
15+
'/*! Image Map Resizer (imageMapResizer.min.js ) - v<%= pkg.version %> - ' +
1716
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
1817
' * Desc: Resize HTML imageMap to scaled image.\n' +
1918
' * Copyright: (c) <%= grunt.template.today("yyyy") %> David J. Bradshaw - dave@bradshaw.net\n' +
2019
' * License: MIT\n */\n',
21-
2220
},
2321

2422
qunit: {
25-
files: ['test/*.html']
23+
files: ['test/*.html'],
2624
},
2725

2826
jshint: {
2927
options: {
30-
globals: {
31-
jQuery:false,
32-
require:true,
33-
process:true
28+
asi: true,
29+
globals: {
30+
jQuery: false,
31+
require: true,
32+
process: true,
3433
},
3534
},
3635
gruntfile: {
37-
src: 'gruntfile.js'
36+
src: 'gruntfile.js',
3837
},
3938
code: {
40-
src: ['js/imageMapResizer.js']
39+
src: ['js/imageMapResizer.js'],
4140
},
4241
},
4342

4443
uglify: {
4544
options: {
46-
sourceMap:true,
47-
report:'gzip',
45+
sourceMap: true,
46+
sourceMapIncludeSources: true,
47+
report: 'gzip',
4848
},
4949
main: {
50-
options:{
51-
banner:'<%= meta.banner %>',
52-
sourceMapName: 'js/imageMapResizer.map'
50+
options: {
51+
banner: '<%= meta.banner %>',
52+
sourceMapName: 'js/imageMapResizer.map',
5353
},
54-
src: ['js/imageMapResizer.js'],
54+
src: 'js/imageMapResizer.js',
5555
dest: 'js/imageMapResizer.min.js',
56-
}
56+
},
5757
},
5858

5959
watch: {
6060
files: ['js/**/*'],
61-
tasks: 'default'
61+
tasks: 'default',
6262
},
6363

6464
bump: {
6565
options: {
66-
files: ['package.json','bower.json'],
66+
files: ['package.json', 'bower.json'],
6767
updateConfigs: ['pkg'],
6868
commit: true,
6969
commitMessage: 'Release v%VERSION%',
@@ -73,15 +73,15 @@ module.exports = function(grunt) {
7373
tagMessage: 'Version %VERSION%',
7474
push: true,
7575
pushTo: 'origin',
76-
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe'
77-
}
76+
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d', // options to use with '$ git describe'
77+
},
7878
},
7979

8080
shell: {
81-
options:{
81+
options: {
8282
stdout: true,
8383
stderr: true,
84-
failOnError: true
84+
failOnError: true,
8585
},
8686
// deployExample: {
8787
// command: function(){
@@ -97,20 +97,18 @@ module.exports = function(grunt) {
9797
// return retStr;
9898
// }
9999
// },
100-
npm:{
101-
command: 'npm publish'
102-
}
103-
}
104-
105-
});
106-
107-
grunt.registerTask('default', ['notest']);
108-
grunt.registerTask('notest', ['jshint','uglify']);
109-
grunt.registerTask('test', ['jshint','qunit']);
100+
npm: {
101+
command: 'npm publish',
102+
},
103+
},
104+
})
110105

111-
grunt.registerTask('postBump',['uglify','bump-commit','shell']);
112-
grunt.registerTask('patch', ['default','bump-only:patch','postBump']);
113-
grunt.registerTask('minor', ['default','bump-only:minor','postBump']);
114-
grunt.registerTask('major', ['default','bump-only:major','postBump']);
106+
grunt.registerTask('default', ['notest'])
107+
grunt.registerTask('notest', ['jshint', 'uglify'])
108+
grunt.registerTask('test', ['jshint', 'qunit'])
115109

116-
};
110+
grunt.registerTask('postBump', ['uglify', 'bump-commit', 'shell'])
111+
grunt.registerTask('patch', ['default', 'bump-only:patch', 'postBump'])
112+
grunt.registerTask('minor', ['default', 'bump-only:minor', 'postBump'])
113+
grunt.registerTask('major', ['default', 'bump-only:major', 'postBump'])
114+
}

0 commit comments

Comments
 (0)