Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
Set both _ and lodash to lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
stevezhu committed Oct 8, 2014
1 parent 466166b commit 56fef63
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion client.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lodash = this._;
console.log(window._);
5 changes: 3 additions & 2 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
lodash = Npm.require('lodash');
_ = lodash;
5 changes: 3 additions & 2 deletions tests/test.js
Original file line number Diff line number Diff line change
@@ -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");
});
4 changes: 2 additions & 2 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"dependencies": [
[
"meteor",
"1.0.3"
"1.1.1"
],
[
"underscore",
"1.0.0"
]
],
"pluginDependencies": [],
"toolVersion": "meteor-tool@1.0.28",
"toolVersion": "meteor-tool@1.0.33",
"format": "1.0"
}

0 comments on commit 56fef63

Please sign in to comment.