From 56fef63cae66e44d8bb4139ca18894bf0f5eec6f Mon Sep 17 00:00:00 2001 From: Steve Zhu Date: Wed, 8 Oct 2014 12:41:55 -0400 Subject: [PATCH] Set both _ and lodash to lodash --- README.md | 8 ++++++++ client.js | 2 +- package.js | 5 +++-- server.js | 1 + tests/test.js | 5 +++-- versions.json | 4 ++-- 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 98fe2de..181ec8f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ +[![Build Status](https://travis-ci.org/stevezhu/meteor-lodash.svg?branch=master)](https://travis-ci.org/stevezhu/meteor-lodash) + A meteor package for [lodash](http://lodash.com/). +## v1.0.0+ + +`_` and `lodash` are both defined as lodash. + +## v0.1.0, v0.2.0 + Use with `lodash`. `_` is still underscore. diff --git a/client.js b/client.js index 260c48e..14fbe8f 100644 --- a/client.js +++ b/client.js @@ -1 +1 @@ -lodash = this._; +console.log(window._); diff --git a/package.js b/package.js index 8f9342e..8267a3c 100644 --- a/package.js +++ b/package.js @@ -4,15 +4,16 @@ Npm.depends({ Package.describe({ summary: "A utility library delivering consistency, customization, performance, & extras.", - version: "0.2.0", + version: "1.0.1", git: "https://github.com/stevezhu/meteor-lodash.git" }); Package.onUse(function(api) { api.versionsFrom('METEOR@0.9.0'); - api.addFiles(['lodash.js', 'client.js'], 'client'); + api.addFiles('lodash.js', 'client'); api.addFiles('server.js', 'server'); api.export('lodash'); + api.export('_'); }); Package.onTest(function(api) { diff --git a/server.js b/server.js index 0d8e8b4..e4404b4 100644 --- a/server.js +++ b/server.js @@ -1 +1,2 @@ lodash = Npm.require('lodash'); +_ = lodash; diff --git a/tests/test.js b/tests/test.js index 10f8107..aa77679 100644 --- a/tests/test.js +++ b/tests/test.js @@ -1,4 +1,5 @@ Tinytest.add("lodash - Exists", function(test) { - test.equal(_, Package.underscore._, "Expected _ to be underscore."); - test.equal(true, typeof lodash !== 'undefined', "Expected lodash to not be undefined") + test.equal(_, lodash, "Expected _ to be lodash"); + test.notEqual(_, Package.underscore._, "Expected _ to not be underscore"); + test.isTrue(typeof lodash !== 'undefined', "Expected lodash to be defined"); }); diff --git a/versions.json b/versions.json index 5960f47..37c642c 100644 --- a/versions.json +++ b/versions.json @@ -2,7 +2,7 @@ "dependencies": [ [ "meteor", - "1.0.3" + "1.1.1" ], [ "underscore", @@ -10,6 +10,6 @@ ] ], "pluginDependencies": [], - "toolVersion": "meteor-tool@1.0.28", + "toolVersion": "meteor-tool@1.0.33", "format": "1.0" } \ No newline at end of file