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

refactor: use jQuery as a weak dependency (similar as Blaze) #19

Open
wants to merge 2 commits into
base: devel
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ Iron.DynamicTemplate
===============================================================
Dynamic templates and data contexts for Meteor.

## Installation
This package has a weak dependency on jQuery (similar as Blaze),
so you can add jQuery to your Meteor app from a [CDN](https://code.jquery.com/) or a [Meteor package](https://atmospherejs.com/meteor/jquery):
```
meteor add jquery
```

## Templates and Helpers

```html
Expand Down
18 changes: 9 additions & 9 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Package.describe({
git: 'https://github.com/iron-meteor/iron-dynamic-template'
});

Package.on_use(function (api) {
Package.onUse(function (api) {
api.versionsFrom('[email protected]');

api.use('blaze');
api.use('underscore');
api.use('ui');
api.use('jquery');
api.use("jquery", { weak: true });
api.use('tracker');
api.use('reactive-var');
api.use('templating');
Expand All @@ -20,13 +20,13 @@ Package.on_use(function (api) {
api.use('iron:[email protected]');
api.imply('iron:core');

api.add_files('version_conflict_error.js');
api.add_files('dynamic_template.html');
api.add_files('dynamic_template.js');
api.add_files('blaze_overrides.js');
api.addFiles('version_conflict_error.js');
api.addFiles('dynamic_template.html');
api.addFiles('dynamic_template.js');
api.addFiles('blaze_overrides.js');
});

Package.on_test(function (api) {
Package.onTest(function (api) {
api.versionsFrom('[email protected]');

api.use('iron:dynamic-template');
Expand All @@ -36,6 +36,6 @@ Package.on_test(function (api) {
api.use('blaze');
api.use('deps');

api.add_files('dynamic_template_test.html', 'client');
api.add_files('dynamic_template_test.js', 'client');
api.addFiles('dynamic_template_test.html', 'client');
api.addFiles('dynamic_template_test.js', 'client');
});