Skip to content

Commit

Permalink
build: config setting
Browse files Browse the repository at this point in the history
  • Loading branch information
kjinengineer committed Nov 16, 2024
1 parent 2b361dd commit b9462e3
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
dist
21 changes: 18 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
{
"name": "tailwind-box",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
}
},
"scripts": {
"build": "yarn build:cjs && yarn build:esm",
"build:cjs": "tsc --p ./tsconfig.cjs.json",
"build:esm": "tsc --p ./tsconfig.esm.json"
},
"author": {
"name": "jnoncode"
},
"devDependencies": {
"typescript": "^5.6.3"
}
},
"license": "MIT"
}
10 changes: 10 additions & 0 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"outDir": "./dist/cjs",
"declaration": true,
"declarationDir": "./dist/cjs"
},
"include": ["src/**/*"]
}
11 changes: 11 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"outDir": "./dist/esm",
"declaration": true,
"declarationDir": "./dist/esm"
},
"include": ["src/**/*"]
}
10 changes: 2 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"outDir": "./dist",
"declaration": true,
"declarationDir": "./dist"
},
"include": ["src/**/*"]
"allowSyntheticDefaultImports": true
}
}

0 comments on commit b9462e3

Please sign in to comment.