diff --git a/meteor/20x20.jpg b/meteor/20x20.jpg new file mode 100644 index 0000000..bb10494 Binary files /dev/null and b/meteor/20x20.jpg differ diff --git a/meteor/tests.js b/meteor/tests.js new file mode 100644 index 0000000..fa76e1c --- /dev/null +++ b/meteor/tests.js @@ -0,0 +1,14 @@ +'use strict'; + +Tinytest.add('Unveil integration', function (test) { + + var img = document.createElement('img'); + img.className = 'unveil'; + img.setAttribute('src', '20x20.jpg'); + img.setAttribute('alt', 'image'); + img.setAttribute('height', '20px'); + img.setAttribute('width', '20px'); + var unveiling = jQuery('img').unveil(); + + test.isNotNull(unveiling, 'instantiation OK'); +}); \ No newline at end of file diff --git a/package.js b/package.js new file mode 100644 index 0000000..e624422 --- /dev/null +++ b/package.js @@ -0,0 +1,26 @@ +// package metadata file for Meteor.js +'use strict'; + +var packageName = 'luisalmeida:unveil'; // https://atmospherejs.com/mediatainment/switchery +var where = 'client'; // where to install: 'client' or 'server'. For both, pass nothing. + +Package.describe({ + name: packageName, + version: '0.0.1', + // Brief, one-line summary of the package. + summary: 'A very lightweight jQuery plugin to lazy load images', + // URL to the Git repository containing the source code for this package. + git: 'https://github.com/luis-almeida/unveil' +}); + +Package.onUse(function (api) { + api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']); + api.use('jquery', where); + api.addFiles('jquery.unveil.js', where); +}); + +Package.onTest(function (api) { + api.use([packageName, 'sanjo:jasmine'], where); + api.use(['webapp','tinytest'], where); + api.addFiles('meteor/tests.js', where); // testing specific files +});