Skip to content

Conversation

@dVelopment
Copy link
Contributor

No description provided.

@hueitan
Copy link
Owner

hueitan commented Oct 14, 2015

Hi @dVelopment Thanks for submit the package for METEOR

I have no experience on meteor, do you mind giving us some informations about this support file?

@dVelopment
Copy link
Contributor Author

Hi @huei90,

sure, I can gladly do so:

A Meteor app handles its dependencies in so called "packages". Each package has a package.js which defines some meta data, its dependencies and which files to load where (on the client, the server or both).

In this case I've setup the file so that dist/angular-validation.js and dist/angular-validation-rule.js are being loaded in the client (lines 19+20) and that the package depends on angular:angular (line 18).

More information:

@hueitan
Copy link
Owner

hueitan commented Oct 14, 2015

I found this https://atmospherejs.com/i/publishing

👍 I will add this later with more information. I need some time to review it before pulling.

Thanks for this 🍻

@hueitan
Copy link
Owner

hueitan commented Oct 15, 2015

@lvarayut @Nazanin1369 Look at this.

package.js Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be huei90:angular-validation

@hueitan
Copy link
Owner

hueitan commented Oct 17, 2015

Then It will be like this

var options = {
  "version": "1.3.2",
  "where": "client",
  "packageName": "huei90:angular-validation"
};

// meta data
Package.describe({
  name: options.packageName,
  version: options.version,
  summary: 'Client-side Validation for AngularJS',
  git: 'https://github.com/huei90/angular-validation',
  documentation: 'README.md'
});

Package.onUse(function(api) {
  api.versionsFrom('METEOR@0.9.0', 'METEOR@1.0');
  api.use('angular:angular@1.3.20', options.where);
  api.addFiles([
    'dist/angular-validation.js',
    'dist/angular-validation.min.js',
    'dist/angular-validation-rule.js',
    'dist/angular-validation-rule.min.js'
  ], options.where);
});

@dVelopment Do you want to recommit the package.js, otherwise I will do it.

@dVelopment
Copy link
Contributor Author

Hi, sorry for the late response.
There are a few issues with that:

  • packageName: one can only publish on atmosphere (the npmjs.org pendant for meteor) with it's own username or for an "organization" one is a member of (username = the prefix of the package name. In my case "dvelpoment"). Therefor I wouldn't be able to republish that package as "huei90:angular-validation", unless I create an organization named "huei90".
  • api.addFiles this would lead to all 4 files (minified and unminified versions) to being loaded on the client. As a convention, one only adds the unminified files because on a development build, all files are being bundled and minified by meteor anyway.

Rest looks fine to me. Please let me know, if you want me to create that organization for you (and add you as a member) of if you want to re-publish it yourself.

@dVelopment
Copy link
Contributor Author

also: only angular:angular@1.3.15 is available on atmosphere.

@hueitan
Copy link
Owner

hueitan commented Oct 17, 2015

@dVelopment Thanks for your comment

var options = {
  "version": "1.3.2",
  "where": "client",
  "packageName": "huei90:angular-validation"
};

// meta data
Package.describe({
  name: options.packageName,
  version: options.version,
  summary: 'Client-side Validation for AngularJS',
  git: 'https://github.com/huei90/angular-validation',
  documentation: 'README.md'
});

Package.onUse(function(api) {
  api.versionsFrom('METEOR@0.9.0', 'METEOR@1.0');
  api.use('angular:angular@1.3.15', options.where);
  api.addFiles([
    'dist/angular-validation.js',
    'dist/angular-validation-rule.js'
  ], options.where);
});

You can submit a new commit with this package.js and I will do the publish job. 😄

edit 1.3.15

hueitan pushed a commit that referenced this pull request Oct 17, 2015
add package.js for Meteor support
@hueitan hueitan merged commit 6f9403d into hueitan:master Oct 17, 2015
@hueitan
Copy link
Owner

hueitan commented Oct 17, 2015

Thanks @dVelopment 🍻

@hueitan
Copy link
Owner

hueitan commented Oct 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants