Skip to content

Commit 7257693

Browse files
committed
update and publish for 0.9.1
1 parent 75ff746 commit 7257693

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ A simple smart package for Meteor that provides a delete button UI component. Th
55

66
## Installation
77

8-
Install using Meteorite. When in a Meteorite-managed app directory, enter:
8+
In your Meteor app directory, enter:
99

1010
```
11-
$ mrt add delete-button
11+
$ meteor add aldeed:delete-button
1212
```
1313

1414
## Usage

delete-button.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ Template.quickRemoveButton.events({
2222
'click button': function (event, template) {
2323
var self = this;
2424
var collection = lookup(self.collection);
25-
if (!(collection instanceof Meteor.Collection)) {
26-
throw new Error("quickRemoveButton: collection attribute must be set to a Meteor.Collection instance or a string reference to a Meteor.Collection instance that is in the window scope.");
25+
if (typeof Meteor !== "undefined" && Meteor.Collection) {
26+
if (!(collection instanceof Meteor.Collection)) {
27+
throw new Error("quickRemoveButton: collection attribute must be set to a Meteor.Collection instance or a string reference to a Meteor.Collection instance that is in the window scope.");
28+
}
29+
} else if (typeof Mongo !== "undefined" && Mongo.Collection) {
30+
if (!(collection instanceof Mongo.Collection)) {
31+
throw new Error("quickRemoveButton: collection attribute must be set to a Mongo.Collection instance or a string reference to a Mongo.Collection instance that is in the window scope.");
32+
}
2733
}
2834
var onError = self.onError || function (error) {
2935
alert("Delete failed");

package.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
Package.describe({
2-
name: "delete-button",
3-
summary: "Provides a delete button UI component"
2+
name: "aldeed:delete-button",
3+
version: "1.0.0",
4+
summary: "Provides a delete button UI component",
5+
git: "https://github.com/aldeed/meteor-delete-button.git"
46
});
57

68
Package.on_use(function(api) {
7-
api.use(['templating', 'mongo-livedata']);
9+
if (api.versionsFrom) {
10+
api.versionsFrom('[email protected]');
11+
api.use(['templating', 'mongo-livedata']);
12+
} else {
13+
api.use(['templating', 'mongo-livedata']);
14+
}
15+
816
api.add_files(['delete-button.html', 'delete-button.js'], 'client');
917
});

smart.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "delete-button",
2+
"name": "aldeed:delete-button",
33
"description": "Provides a delete button UI component",
44
"homepage": "https://github.com/aldeed/meteor-delete-button",
55
"author": "Eric Dobbertin (http://dairystatedesigns.com)",
6-
"version": "0.1.0",
6+
"version": "1.0.0",
77
"git": "https://github.com/aldeed/meteor-delete-button.git",
88
"packages": {}
99
}

0 commit comments

Comments
 (0)