Skip to content

Commit f790a00

Browse files
[#20] 루트에 다 넣을 수 있도록 수정
1 parent 359e860 commit f790a00

File tree

3 files changed

+82
-3
lines changed

3 files changed

+82
-3
lines changed

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
"name": "@naverpay/hidash",
33
"version": "0.0.3",
44
"description": "improved lodash",
5+
"sideEffects": false,
56
"files": [
6-
"dist"
7+
"*.js",
8+
"*.mjs",
9+
"*.d.ts",
10+
"*.d.mts"
711
],
8-
"sideEffects": false,
912
"exports": {
1013
"./isEmpty": {
1114
"import": {
@@ -93,7 +96,9 @@
9396
"test": "vitest run",
9497
"bench": "vitest bench --run",
9598
"coverage": "vitest run --coverage",
96-
"changeset-version": "changeset version && pnpm run md:fix"
99+
"changeset-version": "changeset version && pnpm run md:fix",
100+
"prepublish": "node scripts/pre-build.mjs",
101+
"postpublish": "rimraf ./*.js ./*.mjs ./*.d.ts ./*.d.mts"
97102
},
98103
"author": "yc.effort@navercorp.com",
99104
"license": "MIT",
@@ -114,6 +119,7 @@
114119
"browserslist-to-esbuild": "^2.1.1",
115120
"lefthook": "^1.8.2",
116121
"lodash": "^4.17.21",
122+
"rimraf": "^6.0.1",
117123
"rollup": "^4.24.3",
118124
"rollup-preserve-directives": "^1.1.2",
119125
"tsup": "^8.3.5",

pnpm-lock.yaml

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/pre-build.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// scripts/move-dist.js
2+
import {copyFileSync, readdirSync} from 'fs'
3+
import {join, dirname} from 'path'
4+
import {fileURLToPath} from 'url'
5+
6+
const __filename = fileURLToPath(import.meta.url)
7+
const __dirname = dirname(__filename)
8+
const rootPath = join(__dirname, '..')
9+
const distPath = join(rootPath, 'dist')
10+
11+
const files = readdirSync(distPath)
12+
13+
files.forEach((file) => {
14+
copyFileSync(join(distPath, file), join(rootPath, file))
15+
})

0 commit comments

Comments
 (0)