forked from zuriby/Faker.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package for meteor, including testing the meteor package in travis
- Loading branch information
Ronen Babayoff
committed
Dec 8, 2014
1 parent
daa9f44
commit b142ab6
Showing
10 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ lib-cov | |
node_modules/ | ||
/npm-debug.log | ||
/coverage | ||
.build* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
faker = Npm.require('faker'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |