Merge pull request #1290 from spotify/shmidt-i/yarn-tsc-error-message

More explicit error message when missing .d.ts files
This commit is contained in:
Ivan Shmidt
2020-06-15 15:10:05 +02:00
committed by GitHub
3 changed files with 25 additions and 13 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
"replace-in-file": "^6.0.0",
"rollup": "2.10.x",
"rollup-plugin-dts": "^1.4.6",
"rollup-plugin-esbuild": "^1.4.1",
"rollup-plugin-esbuild": "^2.0.0",
"rollup-plugin-image-files": "^1.4.2",
"rollup-plugin-peer-deps-external": "^2.2.2",
"rollup-plugin-postcss": "^3.1.1",
+4 -1
View File
@@ -14,6 +14,7 @@
* limitations under the License.
*/
import chalk from 'chalk';
import fs from 'fs-extra';
import { relative as relativePath } from 'path';
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
@@ -42,7 +43,9 @@ export const makeConfigs = async (
if (!declarationsExist) {
const path = relativePath(paths.targetDir, typesInput);
throw new Error(
`No declaration files found at ${path}, be sure to run tsc to generate .d.ts files before packaging`,
`No declaration files found at ${path}, be sure to run ${chalk.bgRed.white(
'yarn tsc',
)} to generate .d.ts files before packaging`,
);
}