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.
[dist] Added jsdoc and gh-pages to gulpfile
* Will now build jsdocs as part of build * Will now commit and push jsdocs to gh-pages
- Loading branch information
Showing
3 changed files
with
52 additions
and
16 deletions.
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
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 |
---|---|---|
|
@@ -45,26 +45,32 @@ curl http://faker.hook.io?property=name.findName&locale=de | |
|
||
### Faker.fake() | ||
|
||
As of version `v3.0.0` faker.js contains a super useful generator method `Faker.fake` for combining faker API methods using a mustache string format. | ||
faker.js contains a super useful generator method `Faker.fake` for combining faker API methods using a mustache string format. | ||
|
||
**Example:** | ||
|
||
{{=<% %>=}} | ||
``` js | ||
console.log(faker.fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}')); | ||
console.log(faker.fake("{{name.lastName}}, {{name.firstName}} {{name.suffix}}")); | ||
// outputs: "Marks, Dean Sr." | ||
``` | ||
<%={{ }}=%> | ||
|
||
This will interpolate the format string with the value of methods `name.lastName()`, `name.firstName()`, and `name.suffix()` | ||
|
||
### JSDoc API Browser | ||
|
||
[http://marak.github.io/faker.js/](http://marak.github.io/faker.js/) | ||
|
||
### API Methods | ||
|
||
{{{API}}} | ||
|
||
## Localization | ||
|
||
As of version `v2.0.0` faker.js supports over 27 different language definition packs. | ||
As of version `v2.0.0` faker.js has support for multiple localities. | ||
|
||
The default language is set to English. | ||
The default language locale is set to English. | ||
|
||
Setting a new locale is simple: | ||
|
||
|
@@ -111,27 +117,45 @@ See: https://github.com/lestoni/faker-cli | |
|
||
### Meteor | ||
|
||
#### Meteor installation | ||
#### Meteor Installation | ||
|
||
``` | ||
meteor add practicalmeteor:faker | ||
``` | ||
|
||
meteor add practicalmeteor:faker | ||
#### Meteor Usage, both client and server | ||
|
||
#### meteor usage, both client and server | ||
```js | ||
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 | ||
``` | ||
|
||
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 | ||
## Building faker.js | ||
|
||
faker uses [gulp](http://gulpjs.com/) to automate it's build process. Running the following build command will generate new browser builds, documentation, and code examples for the project. | ||
|
||
``` | ||
npm run-script build | ||
``` | ||
|
||
## Building JSDocs | ||
|
||
``` | ||
npm run-script doc | ||
``` | ||
|
||
## Version Release Schedule | ||
|
||
faker.js is a popular project used by many organizations and individuals in production settings. Major and Minor version releases are generally on a monthly schedule. Bugs fixes are addressed by severity and fixed as soon as possible. | ||
|
||
If you require the absolute latest version of `faker.js` the `master` branch @ http://github.com/marak/faker.js/ should always be up to date and working. | ||
|
||
## Authors | ||
## Maintainer | ||
|
||
#### Matthew Bergman & Marak Squires | ||
#### Marak Squires | ||
|
||
faker.js - Copyright (c) 2014-2015 | ||
faker.js - Copyright (c) 2016 | ||
Matthew Bergman & Marak Squires | ||
http://github.com/marak/faker.js/ | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"opts": { | ||
"destination": "./doc/" | ||
"destination": "../doc/" | ||
}, | ||
|
||
"plugins": [ | ||
|