Skip to content

Commit

Permalink
docs: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch committed Apr 12, 2020
1 parent d82c7ad commit 1b4dd16
Show file tree
Hide file tree
Showing 8 changed files with 239 additions and 117 deletions.
311 changes: 207 additions & 104 deletions README.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sample/factories/pet.factory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Faker from 'faker'
import { define, factory } from '../../dist/typeorm-seeding'
import { define, factory } from '../../src/typeorm-seeding'
import { Pet } from '../entities/Pet.entity'
import { User } from '../entities/User.entity'

Expand Down
2 changes: 1 addition & 1 deletion sample/factories/user.factory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Faker from 'faker'
import { define } from '../../dist/typeorm-seeding'
import { define } from '../../src/typeorm-seeding'
import { User } from '../entities/User.entity'

define(User, (faker: typeof Faker) => {
Expand Down
10 changes: 0 additions & 10 deletions sample/seeds/create-pets.seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,5 @@ import { User } from '../entities/User.entity'
export default class CreatePets implements Seeder {
public async run(factory: Factory, connection: Connection): Promise<any> {
await factory(Pet)().seed()

// const em = connection.createEntityManager()
// await times(1, async (n) => {
// This creates a pet in the database
// const pet = await factory(Pet)().seed()
// This only returns a entity with fake data
// const user = await factory(User)().make()
// user.pets = [pet]
// await em.save(user)
// })
}
}
2 changes: 1 addition & 1 deletion sample/seeds/create-users.seed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Seeder, Factory } from '../../dist/types'
import { Seeder, Factory } from '../../src/types'
import { User } from '../entities/User.entity'

export default class CreateUsers implements Seeder {
Expand Down
Binary file removed w3tec-divider.png
Binary file not shown.
Binary file removed w3tec-logo.png
Binary file not shown.

0 comments on commit 1b4dd16

Please sign in to comment.