Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Meteor.js support #82

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added meteor/20x20.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions meteor/tests.js
Original file line number Diff line number Diff line change
@@ -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');
});
26 changes: 26 additions & 0 deletions package.js
Original file line number Diff line number Diff line change
@@ -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(['[email protected]', '[email protected]']);
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
});