clean types dir before emmitting again
This commit is contained in:
parent
cf5ddfbb3b
commit
842560a4ea
|
@ -42,6 +42,7 @@ import * as bigintCryptoUtils from 'bigint-crypto-utils'
|
|||
The appropriate version for browser or node is automatically exported.
|
||||
|
||||
> `bigint-crypto-utils` uses [ES2020 BigInt](https://tc39.es/ecma262/#sec-bigint-objects), so take into account that:
|
||||
>
|
||||
> 1. If you experience issues using webpack/babel to create your production bundles, you may edit the supported browsers list and leave only [supported browsers and versions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility). The browsers list is usually located in your project's `package.json` or the `.browserslistrc` file.
|
||||
> 2. In order to use `bigint-crypto-utils` with TypeScript you need to set `target`, and `lib` and `module` if in use, to `ES2020` in your project's `tsconfig.json`.
|
||||
|
||||
|
|
|
@ -7,8 +7,7 @@ import typescriptPlugin from '@rollup/plugin-typescript'
|
|||
import commonjs from '@rollup/plugin-commonjs'
|
||||
|
||||
import { dirname, join } from 'path'
|
||||
import { existsSync } from 'fs'
|
||||
import { move } from 'fs-extra'
|
||||
import { existsSync, moveSync, removeSync } from 'fs-extra'
|
||||
import { directories, name as _name, dependencies, peerDependencies, exports, types } from '../package.json'
|
||||
|
||||
const rootDir = join(__dirname, '..')
|
||||
|
@ -45,8 +44,9 @@ const sourcemapOutputOptions = {
|
|||
function moveDirPlugin (srcDir, dstDir) {
|
||||
return {
|
||||
name: 'move-dir',
|
||||
async closeBundle () {
|
||||
move(srcDir, dstDir, { overwrite: true })
|
||||
closeBundle () {
|
||||
removeSync(dstDir)
|
||||
moveSync(srcDir, dstDir, { overwrite: true })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
16
docs/API.md
16
docs/API.md
|
@ -153,7 +153,7 @@ A promise that resolves to a boolean that is either true (a probably prime numbe
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/519dcbc/src/ts/isProbablyPrime.ts#L21)
|
||||
[src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/cf5ddfb/src/ts/isProbablyPrime.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
|
@ -317,7 +317,7 @@ A promise that resolves to a bigint probable prime of bitLength bits.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/519dcbc/src/ts/prime.ts#L21)
|
||||
[src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/cf5ddfb/src/ts/prime.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
|
@ -346,7 +346,7 @@ A bigint probable prime of bitLength bits.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/519dcbc/src/ts/prime.ts#L100)
|
||||
[src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/cf5ddfb/src/ts/prime.ts#L100)
|
||||
|
||||
___
|
||||
|
||||
|
@ -374,7 +374,7 @@ A cryptographically secure random bigint between [min,max]
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/519dcbc/src/ts/randBetween.ts#L15)
|
||||
[src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/cf5ddfb/src/ts/randBetween.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
|
@ -402,7 +402,7 @@ A Promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cry
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/519dcbc/src/ts/randBits.ts#L14)
|
||||
[src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/cf5ddfb/src/ts/randBits.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
|
@ -430,7 +430,7 @@ A Uint8Array/Buffer (Browser/Node.js) filled with cryptographically secure rando
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/519dcbc/src/ts/randBits.ts#L45)
|
||||
[src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/cf5ddfb/src/ts/randBits.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
|
@ -458,7 +458,7 @@ A promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cry
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/519dcbc/src/ts/randBytes.ts#L12)
|
||||
[src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/cf5ddfb/src/ts/randBytes.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
|
@ -486,7 +486,7 @@ A UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure rando
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/519dcbc/src/ts/randBytes.ts#L46)
|
||||
[src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/cf5ddfb/src/ts/randBytes.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
|
|
|
@ -80,7 +80,8 @@
|
|||
"project": "./tsconfig.json",
|
||||
"ignore": [
|
||||
"dist/**/*",
|
||||
"examples/**/*"
|
||||
"examples/**/*",
|
||||
"types/**/*"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
Loading…
Reference in New Issue