ember-faker
Advanced tools
Comparing version 0.0.4 to 1.0.0
{ | ||
"name": "ember-faker", | ||
"description": "Include fake data in your app for testing or prototyping.", | ||
"version": "0.0.4", | ||
"version": "1.0.0", | ||
"directories": { | ||
@@ -41,5 +41,6 @@ "doc": "doc", | ||
"ember-addon": { | ||
"configPath": "tests/dummy/config" | ||
"configPath": "tests/dummy/config", | ||
"defaultBlueprint": "ember-faker" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -5,3 +5,3 @@ # Ember Faker | ||
This is an Ember addon wrapper for [Faker.js](https://github.com/marak/Faker.js/). | ||
Ember addon wrapper for [Faker.js](https://github.com/marak/Faker.js/). | ||
@@ -11,4 +11,3 @@ ## Installation | ||
```javascript | ||
npm install --save-dev ember-faker | ||
ember g ember-faker | ||
ember install:addon ember-faker | ||
``` | ||
@@ -18,3 +17,4 @@ | ||
Import the faker module | ||
Import the faker module with `import faker from 'faker'`. Then you can use it as a default | ||
value for dummy data: | ||
@@ -24,2 +24,16 @@ ```javascript | ||
export default DS.Model.extend({ | ||
firstName: DS.attr('string', { | ||
defaultValue: function() { | ||
return faker.name.firstName(); | ||
} | ||
}) | ||
}); | ||
``` | ||
Or manually set attributes for tests or prototypes: | ||
```javascript | ||
import faker from 'faker'; | ||
// ... | ||
@@ -26,0 +40,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
13884
1
83