Skip to content

Commit e3279de

Browse files
committed
npm run format
1 parent 1ce624b commit e3279de

File tree

2 files changed

+27
-32
lines changed

2 files changed

+27
-32
lines changed

package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"version": "9.2.0",
44
"type": "module",
55
"description": "parse Scrapbox notation to JavaScript Object",
6-
"files": [
7-
"out"
8-
],
6+
"files": ["out"],
97
"main": "./out/index.cjs",
108
"module": "./out/index.mjs",
119
"types": "./out/index.d.mts",
@@ -37,10 +35,7 @@
3735
"type": "git",
3836
"url": "git+https://github.com/progfay/scrapbox-parser.git"
3937
},
40-
"keywords": [
41-
"scrapbox",
42-
"parser"
43-
],
38+
"keywords": ["scrapbox", "parser"],
4439
"author": "progfay",
4540
"license": "MIT",
4641
"bugs": {

tsdown.config.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
import { resolve } from "node:path";
2-
import { defineConfig, type Options } from "tsdown";
2+
import { type Options, defineConfig } from "tsdown";
33

44
type ModuleFormat = Extract<Options["format"], string>;
55

66
const FORMAT_ENTRY_FILE_NAMES_MAP = {
7-
es: "[name].mjs",
8-
esm: "[name].mjs",
9-
module: "[name].mjs",
10-
cjs: "[name].cjs",
11-
commonjs: "[name].cjs",
12-
umd: "scrapbox-parser.umd.js",
13-
iife: undefined,
7+
es: "[name].mjs",
8+
esm: "[name].mjs",
9+
module: "[name].mjs",
10+
cjs: "[name].cjs",
11+
commonjs: "[name].cjs",
12+
umd: "scrapbox-parser.umd.js",
13+
iife: undefined,
1414
} as const satisfies Record<ModuleFormat, string | undefined>;
1515

1616
export default defineConfig([
17-
{
18-
format: ["es", "cjs", "umd"],
19-
entry: resolve(import.meta.dirname, "src/index.ts"),
20-
dts: true,
21-
minify: true,
22-
sourcemap: true,
23-
platform: "neutral",
24-
outDir: "out",
25-
clean: true,
26-
outputOptions: ({ format, entryFileNames, ...options }) => ({
27-
...options,
28-
format,
29-
name: "ScrapboxParser",
30-
entryFileNames:
31-
(format && FORMAT_ENTRY_FILE_NAMES_MAP[format]) ?? entryFileNames,
32-
}),
33-
},
17+
{
18+
format: ["es", "cjs", "umd"],
19+
entry: resolve(import.meta.dirname, "src/index.ts"),
20+
dts: true,
21+
minify: true,
22+
sourcemap: true,
23+
platform: "neutral",
24+
outDir: "out",
25+
clean: true,
26+
outputOptions: ({ format, entryFileNames, ...options }) => ({
27+
...options,
28+
format,
29+
name: "ScrapboxParser",
30+
entryFileNames:
31+
(format && FORMAT_ENTRY_FILE_NAMES_MAP[format]) ?? entryFileNames,
32+
}),
33+
},
3434
]);

0 commit comments

Comments
 (0)