Package.describe({
  name: "ground:db",
  version: "0.0.9",
  summary: "Ground Meteor.Collections offline",
  git: "https://github.com/GroundMeteor/db.git"
});

Package.on_use(function (api) {
  if (api.versionsFrom) {

    api.versionsFrom('METEOR@0.9.1');

    api.use('meteor-platform', ['client', 'server']);

    api.use([
      'meteor',
      'underscore',
      'minimongo',
      'ejson',
      'ground:util@0.0.2',
      'ground:servertime@0.0.0',
      'ground:minimax@0.0.2',
      'ground:localstorage@0.0.2',
      'raix:eventemitter@0.0.2'
    ], ['client', 'server']);

    // Make sure any storage adapters are loaded first
    // api.use([
    //   'ground:localstorage'
    // ], 'client', { weak: true });

    api.export('Ground');

    api.use(['deps'], 'client');

  } else {
    api.use('standard-app-packages', ['client', 'server']);

    api.use([
      'meteor',
      'underscore',
      'minimongo',
      'ejson',
      'ground-util',
      'ground-servertime',
      'ejson-minimax',
      'ground-localstorage',
      'eventemitter'
    ], ['client', 'server']);

    // Make sure any storage adapters are loaded first
    // api.use([
    //   'ground-localstorage'
    // ], 'client', { weak: true });

    api.export('Ground');

    api.use(['deps'], 'client');
  }

  //api.use([], 'server');
  //api.use(['localstorage', 'ejson'], 'client');
  api.add_files([
    'groundDB.client.js',
    'wrap.collection.js',
    'wrap.eventemitter.js',
    'wrap.proto.eventemitter.js',
    ], 'client');
  api.add_files('groundDB.server.js', 'server');
});

Package.on_test(function (api) {
  if (api.versionsFrom) {
    api.use('ground:db', ['client']);
  } else {
    api.use('grounddb', ['client']);
  }
  api.use('test-helpers', 'client');
  api.use(['tinytest', 'underscore', 'ejson', 'ordered-dict',
           'random', 'deps']);

  api.add_files('groundDB.client.tests.js', 'client');
  api.add_files('groundDB.server.tests.js', 'server');
});

@@ -47,19 +47,19 @@
 ion: %220.
-0.9
+1.0
 %22,%0A  sum
@@ -190,37 +190,8 @@
 ) %7B%0A
-  if (api.versionsFrom) %7B%0A%0A  
   ap
@@ -210,15 +210,8 @@
 om('
-METEOR@
 0.9.
@@ -212,26 +212,24 @@
 ('0.9.1');%0A%0A
-  
   api.use('m
@@ -261,34 +261,32 @@
 ', 'server'%5D);%0A%0A
-  
   api.use(%5B%0A    
@@ -273,34 +273,32 @@
 );%0A%0A  api.use(%5B%0A
-  
     'meteor',%0A  
@@ -291,34 +291,32 @@
   'meteor',%0A    
-  
 'underscore',%0A  
@@ -309,34 +309,32 @@
 nderscore',%0A    
- 
- 
 'minimongo',%0A   
@@ -326,34 +326,32 @@
 minimongo',%0A    
-  
 'ejson',%0A      '
@@ -335,34 +335,32 @@
 ',%0A    'ejson',%0A
-  
     'ground:util
@@ -364,34 +364,32 @@
 til@0.0.2',%0A    
-  
 'ground:serverti
@@ -399,18 +399,16 @@
 0.0.0',%0A
-  
     'gro
@@ -427,26 +427,24 @@
 0.0.2',%0A    
-  
 'ground:loca
@@ -464,18 +464,16 @@
 2',%0A    
-  
 'raix:ev
@@ -493,521 +493,41 @@
 0.2'
-%0A    %5D, %5B'client', 'server'%5D);%0A%0A    // Make sure any storage adapters are loaded first%0A    // api.use(%5B%0A    //   'ground:localstorage'%0A    // %5D, 'client', %7B weak: true %7D);%0A%0A    api.export('Ground');%0A%0A    api.use(%5B'deps'%5D, 'client');%0A%0A  %7D else %7B%0A    api.use('standard-app-packages', %5B'client', 'server'%5D);%0A%0A    api.use(%5B%0A      'meteor',%0A      'underscore',%0A      'minimongo',%0A      'ejson',%0A      'ground-util',%0A      'ground-servertime',%0A      'ejson-minimax',%0A      'ground-localstorage',%0A      'eventemitter'%0A  
+,%0A    'raix:stubfence@1.0.0-rc2'%0A
   %5D,
@@ -551,18 +551,16 @@
 er'%5D);%0A%0A
-  
   // Mak
@@ -604,18 +604,16 @@
 d first%0A
-  
   // api
@@ -619,18 +619,16 @@
 i.use(%5B%0A
-  
   //   '
@@ -633,17 +633,17 @@
  'ground
--
+:
 localsto
@@ -650,18 +650,16 @@
 rage'%0A  
- 
- 
 // %5D, 'c
@@ -680,26 +680,24 @@
 : true %7D);%0A%0A
-  
   api.export
@@ -711,18 +711,16 @@
 d');%0A%0A  
- 
- 
 api.use(
@@ -740,19 +740,16 @@
 ient');%0A
-  %7D
 %0A%0A  //ap
@@ -1060,36 +1060,8 @@
 ) %7B%0A
-  if (api.versionsFrom) %7B%0A  
   ap
@@ -1096,60 +1096,8 @@
 %5D);%0A
-  %7D else %7B%0A    api.use('grounddb', %5B'client'%5D);%0A  %7D%0A
   ap

update version and only support >1.0