@favware/rollup-type-bundler
Advanced tools
Comparing version 0.0.1-next.0 to 0.0.1-next.53fb21e.0
@@ -0,4 +1,6 @@ | ||
import { fileExistsAsync } from '#lib/promisified'; | ||
import { rollup } from 'rollup'; | ||
import dts from 'rollup-plugin-dts'; | ||
import { fileURLToPath, URL } from 'url'; | ||
import { setTimeout as sleep } from 'timers/promises'; | ||
/** | ||
@@ -10,2 +12,6 @@ * Bundles all the TypeScript types with {@link rollup} | ||
const typingsFile = fileURLToPath(new URL('index.d.ts', options.dist)); | ||
// Sleep repeated 1 second until the `index.d.ts` file exists | ||
do { | ||
await sleep(1000); | ||
} while (!(await fileExistsAsync(typingsFile))); | ||
await rollup({ | ||
@@ -12,0 +18,0 @@ input: typingsFile, |
import { logVerboseError } from '#lib/logVerbose'; | ||
import { opendir, rm } from 'fs/promises'; | ||
import { join, sep } from 'path'; | ||
import { basename, join, sep } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
@@ -32,3 +32,3 @@ /** | ||
for await (const path of scan(options.dist, cb)) { | ||
if (!path.endsWith(`dist${sep}index.d.ts`)) { | ||
if (!path.endsWith(`${basename(fileURLToPath(options.dist))}${sep}index.d.ts`)) { | ||
await rm(path); | ||
@@ -35,0 +35,0 @@ } |
{ | ||
"name": "@favware/rollup-type-bundler", | ||
"version": "0.0.1-next.0", | ||
"version": "0.0.1-next.53fb21e.0", | ||
"description": "A small CLI tool to bundle types with rollup", | ||
@@ -5,0 +5,0 @@ "author": "@favware", |
@@ -53,3 +53,3 @@ <div align="center"> | ||
``` | ||
```sh | ||
npm install -g @favware/rollup-type-bundler | ||
@@ -56,0 +56,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43866
43
417