amrali / parsleyjs-meteor

Meteor packaging for Parsley.js
10 stars 14 forks source link

Use jquery in package #5

Closed Neobii closed 10 years ago

Neobii commented 10 years ago

Package should look like this right? I'm seeing a $.extend is not defined.

Package.describe({
  summary: "Javascript forms validation. Powerful, UX aware, and dead simple."
});

Package.on_use(function (api) {
  api.use('jquery', 'client');
  api.add_files('parsley.min.js', 'client');
  api.add_files('parsley.remote.min.js', 'client');
});
amrali commented 10 years ago

Yes, that's the correct package file. There's no call to jquery that I'm aware of there. When do you get that error?

Neobii commented 10 years ago

This is the error without that line: Uncaught TypeError: Cannot read proiperty 'extend' of undefined parsley.remote.min.js:1 The error pops when I add the package only, I haven't used it to validate anything yet, however when I added the jquery line the error stopped and I noticed that extend is $.extend from jquery.

amrali commented 10 years ago

6 fixed this.