Skip to content

Commit

Permalink
chore(prettier-config): relocate source files (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrbrown authored Sep 25, 2024
1 parent 81945c5 commit 0dea4eb
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 25 deletions.
3 changes: 1 addition & 2 deletions packages/prettier-config/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
*.d.ts
*.js
test/_fixtures
4 changes: 1 addition & 3 deletions packages/prettier-config/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
!*.d.ts
!*.js
test/fixtures/**
test/fixtures/
25 changes: 12 additions & 13 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,26 @@
"type": "module",
"exports": {
".": {
"types": "./prettier.config.d.ts",
"import": "./prettier.config.js"
"types": "./lib/prettier.config.d.ts",
"import": "./lib/prettier.config.js"
},
"./100-proof": "./prettier.config.js",
"./120-proof": "./120-proof.js",
"./semi/*": "./*.js?semi=true",
"./semi": "./prettier.config.js?semi=true",
"./*/semi": "./*.js?semi=true",
"./100-proof": "./lib/prettier.config.js",
"./120-proof": "./lib/120-proof.js",
"./semi/*": "./lib/*.js?semi=true",
"./semi": "./lib/prettier.config.js?semi=true",
"./*/semi": "./lib/*.js?semi=true",
"./package.json": "./package.json"
},
"main": "prettier.config.js",
"types": "prettier.config.d.ts",
"main": "./lib/prettier.config.js",
"types": "./lib/prettier.config.d.ts",
"files": [
"*.js",
"*.ts",
"lib",
"src",
"!**/*.map",
"!tsup.config.ts"
],
"scripts": {
"build": "tsup && pnpm run format",
"format": "prettier --ignore-path .prettierignore --log-level log --write .",
"build": "tsup",
"test": "vitest"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import prettierConfig from '@bfra.me/prettier-config'
import prettierConfig from './prettier.config.js'
import type {Config} from 'prettier'

const {searchParams: params} = new URL(import.meta.url)
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/prettier-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": ".",
"rootDir": ".",
"sourceMap": false
"outDir": "./lib",
"rootDir": "./src"
},
"include": ["./*.ts"]
"include": ["./src/**/*.ts"]
}
6 changes: 4 additions & 2 deletions packages/prettier-config/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import {defineConfig} from 'tsup'

export default defineConfig({
bundle: false,
clean: true,
dts: true,
entry: ['prettier.config.ts', '120-proof.ts', 'plugins.ts'],
entry: ['./src/*.ts'],
format: ['esm'],
outDir: '.',
outDir: 'lib',
sourcemap: true,
// Splitting can place code using `import.meta` into a separate chunk, which breaks the preset export mappings.
splitting: false,
})

0 comments on commit 0dea4eb

Please sign in to comment.