Skip to content

Commit

Permalink
fix: fix #331
Browse files Browse the repository at this point in the history
chore(demo): version updates
  • Loading branch information
barbatus committed Aug 3, 2016
1 parent 1c2dd58 commit 5a976ac
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 17 deletions.
3 changes: 2 additions & 1 deletion atmosphere-packages/css-compiler/compilers/basic_compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ BasicCompiler = class BasicCompiler {
const sourcePath = inputFile.getPathInPackage();
const targetPath = ex !== 'css' ? sourcePath + '.css' : sourcePath;

if (!sourcePath.startsWith('imports')) {
// Combine all styles from other than imports folders.
if (sourcePath.indexOf('imports') === -1) {
inputFile.addStylesheet({
data: result.css,
path: targetPath,
Expand Down
5 changes: 3 additions & 2 deletions dist/cursor_handle.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use strict';
var utils_1 = require('./utils');
var CursorHandle = (function () {
function CursorHandle(hCurObserver, hAutoNotify) {
check(hAutoNotify, Match.Optional(Tracker.Computation));
check(hCurObserver, Match.Where(function (observer) {
utils_1.check(hAutoNotify, Match.Optional(Tracker.Computation));
utils_1.check(hCurObserver, Match.Where(function (observer) {
return !!observer.stop;
}));
this._hAutoNotify = hAutoNotify;
Expand Down
6 changes: 3 additions & 3 deletions dist/data_observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var DataObserver = (function () {
}
DataObserver.pushCb = function (callbacks) {
var _this = this;
check(callbacks, Match.Where(utils_1.isMeteorCallbacks));
utils_1.check(callbacks, Match.Where(utils_1.isMeteorCallbacks));
var completer = async_1.PromiseWrapper.completer();
var dequeue = function (promise) {
var index = _this._promises.indexOf(promise);
Expand Down Expand Up @@ -61,7 +61,7 @@ var DataObserver = (function () {
return newCallback;
};
DataObserver.onSubsReady = function (cb) {
check(cb, Function);
utils_1.check(cb, Function);
new Promise(function (resolve, reject) {
var poll = Meteor.setInterval(function () {
if (DDP._allSubscriptionsReady()) {
Expand All @@ -72,7 +72,7 @@ var DataObserver = (function () {
}).then(function () { return cb(); });
};
DataObserver.onReady = function (cb) {
check(cb, Function);
utils_1.check(cb, Function);
Promise.all(this._promises).then(function () { return cb(); });
};
DataObserver.cbLen = function () {
Expand Down
5 changes: 3 additions & 2 deletions dist/meteor_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var core_1 = require('@angular/core');
var core_2 = require('@angular/core');
var lang_1 = require('@angular/core/src/facade/lang');
var async_1 = require('@angular/core/src/facade/async');
var utils_1 = require('./utils');
var data_observer_1 = require('./data_observer');
// Makes it possible to take an app instance by DOM element of the main component.
var MeteorAppRegistry = (function () {
Expand Down Expand Up @@ -74,7 +75,7 @@ var MeteorApp = (function () {
};
MeteorApp.prototype.onRendered = function (cb) {
var _this = this;
check(cb, Function);
utils_1.check(cb, Function);
this._appCycles.onStable(function () {
data_observer_1.DataObserver.onReady(function () {
// No way to get ngZone's inner zone,
Expand Down Expand Up @@ -114,7 +115,7 @@ var AppCycles = (function () {
return this._isZoneStable && !this._ngZone.hasPendingMacrotasks;
};
AppCycles.prototype.onStable = function (cb) {
check(cb, Function);
utils_1.check(cb, Function);
this._onStableCb.push(cb);
this._runIfStable();
};
Expand Down
5 changes: 3 additions & 2 deletions dist/mongo_cursor_observer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
var cursor_handle_1 = require('./cursor_handle');
var utils_1 = require('./utils');
var AddChange = (function () {
function AddChange(index, item) {
this.index = index;
Expand Down Expand Up @@ -61,7 +62,7 @@ var MongoCursorObserver = (function () {
this._lastChanges = [];
this._subs = [];
this._isSubscribed = false;
check(cursor, Match.Where(MongoCursorObserver.isCursor));
utils_1.check(cursor, Match.Where(MongoCursorObserver.isCursor));
this._hCursor = this._processCursor(cursor);
}
MongoCursorObserver.isCursor = function (cursor) {
Expand Down Expand Up @@ -136,7 +137,7 @@ var MongoCursorObserver = (function () {
changedAt: function (nDoc, oDoc, index) {
var doc = self._docs[index];
var mDoc = nDoc;
if (EJSON.equals(doc._id, mDoc._id)) {
if (utils_1.EJSON.equals(doc._id, mDoc._id)) {
Object.assign(self._docs[index], mDoc);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion dist/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var ZoneRunScheduler = (function () {
this._zoneTasks.set(zone, runTask);
};
ZoneRunScheduler.prototype.onAfterRun = function (zone, cb) {
check(cb, Function);
utils_1.check(cb, Function);
if (!this._zoneTasks.has(zone)) {
cb();
return;
Expand Down
2 changes: 2 additions & 0 deletions dist/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ export declare function isMeteorCallbacks(callbacks: any): boolean;
export declare function isCallbacksObject(callbacks: any): boolean;
export declare const g: any;
export declare const gZone: any;
export declare const EJSON: any;
export declare const check: any;
2 changes: 2 additions & 0 deletions dist/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ exports.g = typeof global === 'object' ? global :
typeof window === 'object' ? window :
typeof self === 'object' ? self : this;
exports.gZone = exports.g.Zone.current;
exports.EJSON = Package['ejson'].EJSON;
exports.check = Package['check'].check;
6 changes: 3 additions & 3 deletions examples/todos-meteor-1.3/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"private": true,
"dependencies": {
"@angular/core": "^2.0.0-rc.2",
"@angular/common": "^2.0.0-rc.2",
"@angular/forms": "^0.1.1",
"@angular/core": "^2.0.0-rc.3",
"@angular/common": "^2.0.0-rc.3",
"@angular/forms": "^0.2.0",
"angular2-meteor-polyfills": "^0.1.1",
"angular2-meteor": "file:../..",
"angular2-meteor-auto-bootstrap": "https://github.com/Urigo/angular2-meteor-auto-bootstrap",
Expand Down
2 changes: 2 additions & 0 deletions modules/cursor_handle.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

import {check} from './utils';

export class CursorHandle {
private _hAutoNotify: Tracker.Computation;
private _hCurObserver: Meteor.LiveQueryHandle;
Expand Down
3 changes: 2 additions & 1 deletion modules/data_observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
CallbacksObject,
MeteorCallbacks,
isMeteorCallbacks,
isCallbacksObject
isCallbacksObject,
check
} from './utils';

/**
Expand Down
2 changes: 2 additions & 0 deletions modules/meteor_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
import {isPresent, isBlank, scheduleMicroTask} from '@angular/core/src/facade/lang';
import {ObservableWrapper} from '@angular/core/src/facade/async';

import {check} from './utils';

import {DataObserver} from './data_observer';

export type Providers = Array<Type | Provider | any[]>;
Expand Down
2 changes: 2 additions & 0 deletions modules/mongo_cursor_observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import {CursorHandle} from './cursor_handle';

import {EJSON, check} from './utils';

export class AddChange {
constructor(public index: number, public item: any) {}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import {noop, isPresent} from '@angular/core/src/facade/lang';

import {isMeteorCallbacks, g, gZone} from './utils';
import {isMeteorCallbacks, g, gZone, check} from './utils';

export class ZoneRunScheduler {
private _zoneTasks = new Map<Zone, Task>();
Expand Down
4 changes: 4 additions & 0 deletions modules/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ export const g =
typeof self === 'object' ? self : this;

export const gZone = g.Zone.current;

export const EJSON = Package['ejson'].EJSON;

export const check = Package['check'].check;
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"files": [
"modules/index.ts",
"modules/main.ts",
"typings/index.d.ts"
"typings/index.d.ts",
"typings/main.d.ts"
],
"exclude": [
"examples",
Expand Down

0 comments on commit 5a976ac

Please sign in to comment.