Skip to content

Commit

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

async function main() {
const input = resolve(__dirname, 'src', 'jimp.ts')
const output = resolve(__dirname, 'dist', 'jimp.cjs')
const pkg = resolve(__dirname, 'package.json')
const rootDir = __dirname
const input = resolve(rootDir, 'src', 'jimp.ts')
const output = resolve(rootDir, 'dist', 'jimp.cjs')
const pkg = resolve(rootDir, 'package.json')

const opts = {
cache: false,
Expand All @@ -25,6 +26,8 @@ async function main() {

await writeJSON(pkg, { ...await readJSON(pkg), version }, { spaces: 2 })

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

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

Expand Down

0 comments on commit 917adb1

Please sign in to comment.