Skip to content

Commit

Permalink
fix: bundle types (resolves #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 20, 2021
1 parent 917adb1 commit 1821783
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules
dist
*.out.*
fonts
types
4 changes: 3 additions & 1 deletion build.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { resolve, dirname } from 'path'
import { copy, outputFile, readJSON, writeJSON } from 'fs-extra'
import { copy, copyFile, outputFile, readJSON, writeJSON } from 'fs-extra'
import ncc from '@vercel/ncc'

async function main() {
Expand Down Expand Up @@ -28,6 +28,8 @@ async function main() {

await copy(resolve(jimpDir, 'fonts'), resolve(rootDir, 'fonts'))

await copyFile(resolve(jimpDir, 'types/ts3.1/index.d.ts'), resolve(rootDir, 'dist/jimp.d.ts'))

console.log('jimp-compact@' + version)
}

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"repository": "unjs/jimp-compact",
"license": "MIT",
"files": [
"dist"
"dist",
"fonts"
],
"main": "./dist/jimp.cjs",
"types": "./dist/jimp.d.ts",
"scripts": {
"build": "jiti ./build",
"test": "node ./test/index.js"
Expand Down

0 comments on commit 1821783

Please sign in to comment.