npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aurelia-meteor

v1.1.9

Published

A Meteor adapter for Aurelia.

Downloads

29

Readme

aurelia-meteor

npm Version

Platform Support

This library can be used in the browser only.

This library has primarily be done for Meteor 1.3+ with use of NPM with commonjs.

You can use this module with meteor-client-packages-meteor witch is for Use Meteor's client Packages in a non Meteor project.

If you want the amd, systemjs, es2015 or other version your welcome to help me.

Library content

For now, we only have 4 components :

  • BlazeAdaptor class used to adapt the <login-buttons> to be used in Aurelia
  • <login-buttons> we can put anywhere in a HTML file
  • Meteor class giving live informations on meteor
  • reactiveProperty to make an aurelia property reactive

Library use

1. BlazeAdaptor class

See the login-buttons.js file to see how it can be used.

2. <login-buttons>

<require from="aurelia-meteor/login-buttons"></require>

<login-buttons></login-buttons>

and

meteor add accounts-password
meteor add accounts-ui
npm install --save aurelia-meteor

and

If you use a non meteor client like with meteor-client-packages-meteor, be shure to have your index.html in UTF-8 :

<!DOCTYPE html>
<html>
  <head>
    <!--meta http-equiv="content-type" content="text/html; charset=utf-8" /-->  <!-- HTML4 -->
    <meta charset="UTF-8"> <!-- HTML5 -->
    ...
  </head>
  ...
</html>

3. Meteor class

import { autoinject } from 'aurelia-framework';
import { Meteor } from 'aurelia-meteor';

@autoinject
export class Welcome {
  public meteor: Meteor;

  constructor(meteor: Meteor) {
    this.meteor = meteor;
  }
}
<template>
  <p>status : ${meteor.status}</p>
  <p>statusString : ${meteor.statusString}</p>
  <p>connected : ${meteor.connected}</p>
  <p>retryCount : ${meteor.retryCount}</p>
  <p>userId : ${meteor.userId}</p>
  <p>isClient : ${meteor.isClient}</p>
  <p>isCordova : ${meteor.isCordova}</p>
  <p>isServer : ${meteor.isServer}</p>
  <p>release : ${meteor.release}</p>
  <p>address : ${meteor.address}</p>
  <p>verified : ${meteor.verified}</p>
  <p>username : ${meteor.username}</p>
  <p>createdAt : ${meteor.createdAt}</p>
</template>

The difference between meteor.statusString and meteor.status is that meteor.statusString is a string while meteor.status is an enum class.

4. reactiveProperty

import { reactiveProperty } from 'aurelia-meteor';
import { Tracker } from 'meteor/tracker';

export class SampleClass {
  @reactiveProperty propertyToBeReactive: boolean;

  constructor() {
    Tracker.autorun(() => {
      if (reactiveProperty(this, 'propertyToBeReactive')) {
        ...
      }
    });
  }

Notice that the parameter string of the function reactiveProperty is the property name.

If you have an other solution, please tell me.

Building The Code

To build the code, follow these steps.

  1. Ensure that NodeJS is installed. This provides the platform on which the build tooling runs.

  2. From the project folder, execute the following commands:

npm install
typings install
npm build
  1. You will find the compiled code in the dist folder.