mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Organize files into directories: client, common, server, test
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import { DDP, LivedataTest } from './namespace';
|
||||
|
||||
import { DDP, LivedataTest } from '../common/namespace';
|
||||
import './stream_client_sockjs';
|
||||
|
||||
import './livedata_connection';
|
||||
import '../common/livedata_connection';
|
||||
|
||||
import './client_convenience';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DDP } from "./namespace.js";
|
||||
import { DDP } from "../common/namespace.js";
|
||||
|
||||
// Meteor.refresh can be called on the client (if you're in common code) but it
|
||||
// only has an effect on the server.
|
||||
@@ -1,12 +1,12 @@
|
||||
import { DDP, LivedataTest } from "./namespace.js";
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { toSockjsUrl } from './urlHelpers';
|
||||
|
||||
// This populates a global variable
|
||||
import './sockjs-0.3.4';
|
||||
|
||||
import { addCommonMethodsToPrototype } from './stream_client_common';
|
||||
import { DDP, LivedataTest } from "../common/namespace.js";
|
||||
import { toSockjsUrl } from '../common/urlHelpers';
|
||||
import { addCommonMethodsToPrototype } from '../common/stream_client_common';
|
||||
|
||||
// @param url {String} URL to Meteor app
|
||||
// "http://subdomain.meteor.com/" or "/" or
|
||||
@@ -1,5 +1,3 @@
|
||||
import { DDP, LivedataTest } from "./namespace.js";
|
||||
import { MongoIDMap } from "./id_map.js";
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { DDPCommon } from 'meteor/ddp-common';
|
||||
@@ -13,6 +11,9 @@ if (Meteor.isServer) {
|
||||
var Future = Npm.require('fibers/future');
|
||||
}
|
||||
|
||||
import { DDP, LivedataTest } from "./namespace.js";
|
||||
import { MongoIDMap } from "./id_map.js";
|
||||
|
||||
// @param url {String|Object} URL to Meteor app,
|
||||
// or an object as a test hook (see code)
|
||||
// Options:
|
||||
@@ -1,10 +1,11 @@
|
||||
import { DDP, LivedataTest } from "./namespace.js";
|
||||
import { Random } from 'meteor/random';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { Retry } from 'meteor/retry';
|
||||
|
||||
import { DDP, LivedataTest } from "./namespace.js";
|
||||
|
||||
export function addCommonMethodsToPrototype(proto) {
|
||||
_.extend(proto, {
|
||||
// Register for callbacks.
|
||||
@@ -29,8 +29,8 @@ Package.onUse(function (api) {
|
||||
|
||||
// For backcompat where things use Package.ddp.DDP, etc
|
||||
api.export('DDP');
|
||||
api.mainModule("client.js", "client");
|
||||
api.mainModule("server.js", "server");
|
||||
api.mainModule("client/client.js", "client");
|
||||
api.mainModule("server/server.js", "server");
|
||||
});
|
||||
|
||||
Package.onTest(function (api) {
|
||||
@@ -49,14 +49,14 @@ Package.onTest(function (api) {
|
||||
'ejson'
|
||||
]);
|
||||
|
||||
api.addFiles('stub_stream.js');
|
||||
api.addFiles('livedata_connection_tests.js', ['client', 'server']);
|
||||
api.addFiles('livedata_tests.js', ['client', 'server']);
|
||||
api.addFiles('livedata_test_service.js', ['client', 'server']);
|
||||
api.addFiles('random_stream_tests.js', ['client', 'server']);
|
||||
api.addFiles('test/stub_stream.js');
|
||||
api.addFiles('test/livedata_connection_tests.js', ['client', 'server']);
|
||||
api.addFiles('test/livedata_tests.js', ['client', 'server']);
|
||||
api.addFiles('test/livedata_test_service.js', ['client', 'server']);
|
||||
api.addFiles('test/random_stream_tests.js', ['client', 'server']);
|
||||
|
||||
api.use('http', 'client');
|
||||
api.addFiles(['stream_tests.js'], 'client');
|
||||
api.addFiles('stream_client_tests.js', 'server');
|
||||
api.addFiles('test/stream_tests.js', 'client');
|
||||
api.addFiles('test/stream_client_tests.js', 'server');
|
||||
api.use('check', ['client', 'server']);
|
||||
});
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { DDP, LivedataTest } from './namespace';
|
||||
|
||||
import './stream_client_nodejs';
|
||||
|
||||
import './livedata_connection';
|
||||
|
||||
export { DDP, LivedataTest };
|
||||
7
packages/ddp-client/server/server.js
Normal file
7
packages/ddp-client/server/server.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { DDP, LivedataTest } from '../common/namespace';
|
||||
|
||||
import './stream_client_nodejs';
|
||||
|
||||
import '../common/livedata_connection';
|
||||
|
||||
export { DDP, LivedataTest };
|
||||
@@ -1,9 +1,9 @@
|
||||
import { DDP, LivedataTest } from "./namespace";
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { toWebsocketUrl } from './urlHelpers';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
|
||||
import { addCommonMethodsToPrototype } from './stream_client_common';
|
||||
import { DDP, LivedataTest } from "../common/namespace";
|
||||
import { toWebsocketUrl } from '../common/urlHelpers';
|
||||
import { addCommonMethodsToPrototype } from '../common/stream_client_common';
|
||||
|
||||
// @param endpoint {String} URL to Meteor app
|
||||
// "http://subdomain.meteor.com/" or "/" or
|
||||
@@ -1,5 +1,5 @@
|
||||
import lolex from 'lolex';
|
||||
import { DDP, LivedataTest } from "./namespace.js";
|
||||
import { DDP, LivedataTest } from "../common/namespace.js";
|
||||
|
||||
var newConnection = function (stream, options) {
|
||||
// Some of these tests leave outstanding methods with no result yet
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DDP, LivedataTest } from "./namespace.js";
|
||||
import { DDP, LivedataTest } from "../common/namespace.js";
|
||||
|
||||
// XXX should check error codes
|
||||
var failure = function (test, code, reason) {
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LivedataTest } from "./namespace.js";
|
||||
import { LivedataTest } from "../common/namespace.js";
|
||||
|
||||
var Fiber = Npm.require('fibers');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LivedataTest } from "./namespace.js";
|
||||
import { LivedataTest } from "../common/namespace.js";
|
||||
|
||||
Tinytest.add("stream - status", function (test) {
|
||||
// Very basic test. Just see that it runs and returns something. Not a
|
||||
Reference in New Issue
Block a user