-
-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a379225
commit 12e3365
Showing
41 changed files
with
308 additions
and
3,541 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
lib/ | ||
dist/ |
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,7 +1,5 @@ | ||
coverage/ | ||
dist/ | ||
doc/ | ||
examples/browser/js/ | ||
lib/ | ||
CHANGELOG.md | ||
CHANGELOG_old.md | ||
pnpm-lock.yaml |
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,23 +1,21 @@ | ||
A lot of effort has been put into `Faker` to create a useful and handy | ||
library. There are still a lot of things to be done, so all contributions are welcome! If you can make `Faker` better, please read the following contribution guide. | ||
A lot of effort has been put into `Faker` to create a useful and handy library. | ||
There are still a lot of things to be done, so all contributions are welcome! | ||
If you want to make `Faker` a better, please read the following contribution guide. | ||
|
||
# Important | ||
|
||
- Please make sure that you run both `gulp` and tests before making a PR. | ||
- Please make sure that you run `pnpm install`, `pnpm run build` and `pnpm run test` before making a PR to ensure that everything is working from the start. | ||
|
||
## Support | ||
## Good to know | ||
|
||
`Faker` relies on [commonJS](http://www.commonjs.org/) standard and supports both node.js and the browsers. Keep this in mind, when modifying and/or extending the sources. | ||
|
||
## Automation | ||
|
||
- The project is being built by [gulp](http://gulpjs.com/) (see [gulpfile](build/gulpfile.js)), destination directory is [build/build](build/build) | ||
- The documentation is auto-generated, based on [build/src](build/src) markdown sources. If you modify the main [Readme.md](Readme.md) file, the Pull Request will be rejected, since it will be overwritten by the upcoming `gulp` execution | ||
- The project is being built by [esbuild](https://esbuild.github.io) (see [bundle.ts](scripts/bundle.ts)) | ||
- The documentation is running via VitePress. | ||
Make sure you **build** the project before running the docs, cause some files depend on `dist`. | ||
Use `pnpm run docs:dev` to edit them in live mode. | ||
- The tests are executing `vitest` against `test/**/*.spec.ts` | ||
|
||
## Architecture | ||
|
||
The sources are located in the [lib](lib) directory. All fake data generators are | ||
divided into namespaces (each namespace being a separate module). Most of the | ||
generators use the _definitions_, which are just plain JavaScript | ||
objects/arrays/strings that are separate for each [locale](lib/locales). | ||
The sources are located in the [src](src) directory. | ||
All fake data generators are divided into namespaces (each namespace being a separate module). | ||
Most of the generators use the _definitions_, which are just plain JavaScript objects/arrays/strings that are separate for each [locale](src/locales). |
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
<script setup> | ||
import { ref } from 'vue'; | ||
import { faker } from '../../../../dist/esm'; | ||
const faker = ref(); | ||
const ready = ref(false); | ||
import('../../../../dist/faker').then((_faker) => { | ||
window.faker = _faker.default; | ||
faker.value = _faker.default; | ||
ready.value = true; | ||
}); | ||
window.faker = faker; | ||
</script> | ||
|
||
<template> | ||
<h2>🚧 Playground under construction 🚧</h2> | ||
<h3>window.faker</h3> | ||
<pre v-if="ready">{{ Object.keys(faker) }}</pre> | ||
<pre>{{ Object.keys(faker) }}</pre> | ||
</template> |
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 was deleted.
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
Oops, something went wrong.