feat: more explicit error message

This commit is contained in:
Ivan Shmidt
2020-06-15 09:30:14 +02:00
parent 8054f61246
commit e91a4402f4
+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`,
);
}