Skip to content

Commit

Permalink
fix: Add typescript type defs in esm build (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
allmoviestvshowslistsfilmography28 committed Aug 10, 2020
1 parent 29c2090 commit 212e799
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/esm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const fs = require('fs')
const path = require('path')
const util = require('util')
const { ncp } = require('ncp')

const { promisify } = util

Expand All @@ -15,6 +16,10 @@ const localeDir = path.join(process.env.PWD, 'esm/locale');
const result = readFile.replace("'dayjs'", "'../index'")
await promisify(fs.writeFile)(filePath, result, 'utf8')
})

ncp('./types/', './esm', (err) => {
if (err) { throw err }
})
} catch (e) {
console.error(e) // eslint-disable-line no-console
}
Expand Down

0 comments on commit 212e799

Please sign in to comment.