Skip to content

Commit

Permalink
chore: switch to tsup
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Sep 20, 2023
1 parent da423b6 commit cae028f
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 302 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This is a shorthand for running the following scripts in order:

## Good to know

- The project is being built by [esbuild](https://esbuild.github.io) (see [bundle.ts](scripts/bundle.ts))
- The project is being built by [tsup](https://tsup.egoist.dev) (see [tsup.config.ts](tsup.config.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.
Expand Down Expand Up @@ -49,7 +49,7 @@ Please only change files related to one module (e.g. person, location) whenever

## Building Faker

The project is being built by [esbuild](https://esbuild.github.io) (see [bundle.ts](scripts/bundle.ts))
The project is being built by [tsup](https://tsup.egoist.dev) (see [tsup.config.ts](tsup.config.ts))

```shell
pnpm install
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
],
"bugs": "https://github.com/faker-js/faker/issues",
"license": "MIT",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.mjs",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "index.d.ts",
"typesVersions": {
">=4.0": {
Expand All @@ -41,13 +41,13 @@
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.mjs"
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./locale/*": {
"types": "./dist/types/locale/*.d.ts",
"require": "./dist/cjs/locale/*.js",
"import": "./dist/esm/locale/*.mjs"
"require": "./dist/locale/*.js",
"import": "./dist/locale/*.mjs"
},
"./package.json": "./package.json"
},
Expand All @@ -58,7 +58,7 @@
"scripts": {
"clean": "rimraf coverage .eslintcache dist docs/.vitepress/dist locale pnpm-lock.yaml node_modules",
"build:clean": "rimraf dist",
"build:code": "tsx ./scripts/bundle.ts",
"build:code": "tsup-node",
"build:types": "tsc --project tsconfig.build.json",
"build": "run-s build:clean build:code build:types",
"generate": "run-s generate:locales generate:api-docs",
Expand Down Expand Up @@ -101,7 +101,6 @@
"@vueuse/core": "~10.4.1",
"conventional-changelog-cli": "~4.1.0",
"cypress": "~13.2.0",
"esbuild": "~0.19.3",
"eslint": "~8.49.0",
"eslint-config-prettier": "~9.0.0",
"eslint-define-config": "~1.23.0",
Expand All @@ -118,6 +117,7 @@
"sanitize-html": "~2.11.0",
"semver": "~7.5.4",
"standard-version": "~9.5.0",
"tsup": "~7.2.0",
"tsx": "~3.12.10",
"typedoc": "~0.24.8",
"typescript": "~4.9.5",
Expand Down
Loading

0 comments on commit cae028f

Please sign in to comment.