Skip to content

Commit

Permalink
Package for meteor, including testing the meteor package in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronen Babayoff committed Dec 8, 2014
1 parent daa9f44 commit b142ab6
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ lib-cov
node_modules/
/npm-debug.log
/coverage
.build*
1 change: 1 addition & 0 deletions .npm/package/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 7 additions & 0 deletions .npm/package/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.

You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.
7 changes: 7 additions & 0 deletions .npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@ language: node_js
node_js:
- "0.11"
- "0.10"
# - "0.8"
# meteor specific node version
- "0.10.29"
# - "0.8"

before_install:
# Install meteor and spacejam, a meteor command line package tester
- "if [ "$(node -v)" == "v0.10.29" ]; then; curl https://install.meteor.com | /bin/sh; npm install -g spacejam; fi"

script:
- "npm test"
- "if [ "$(node -v)" == "v0.10.29" ]; then; spacejam test-packages ./; fi"
12 changes: 12 additions & 0 deletions Readme.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@
var randomEmail = faker.internet.email(); // [email protected]
var randomCard = faker.helpers.createCard(); // random contact card containing many properties

### meteor

#### meteor installation

meteor add practicalmeteor:faker

#### meteor usage, both client and server

var randomName = faker.name.findName(); // Rowan Nikolaus
var randomEmail = faker.internet.email(); // [email protected]
var randomCard = faker.helpers.createCard(); // random contact card containing many properties

### Localization

As of version `v2.0.0` faker.js supports 27 different language definition packs.
Expand Down
1 change: 1 addition & 0 deletions meteor/npm-require.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
faker = Npm.require('faker');
5 changes: 5 additions & 0 deletions meteor/tests/faker-export-test.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Tinytest.add 'faker - should exist', ->
expect(faker).to.be.an('object')
expect(faker.name).to.be.an('object')
expect(faker.name.firstName).to.be.a('function')
expect(faker.name.firstName()).to.be.a('string').that.is.ok
29 changes: 29 additions & 0 deletions package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Npm.depends({
'faker': '2.1.1'
});


Package.describe({
summary: "Generate massive amounts of fake data in node.js and in the browser.",
name: "practicalmeteor:faker",
version: "2.1.1_1",
git: "https://github.com/practicalmeteor/faker.js.git"
});


Package.onUse(function (api) {
api.versionsFrom('1.0');

api.addFiles('meteor/npm-require.js', 'server');

api.addFiles('build/build/faker.js', 'client');

api.export("faker", "server");
});


Package.onTest(function(api) {
api.use(['practicalmeteor:faker', "coffeescript", "tinytest", 'practicalmeteor:chai']);

api.addFiles("meteor/tests/faker-export-test.coffee");
});
15 changes: 15 additions & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"dependencies": [
[
"meteor",
"1.1.3"
],
[
"underscore",
"1.0.1"
]
],
"pluginDependencies": [],
"toolVersion": "[email protected]",
"format": "1.0"
}

0 comments on commit b142ab6

Please sign in to comment.