UNPKG

540 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7const chalk_1 = require("chalk");
8
9const TS_REGEX = /\.ts$/;
10
11module.exports = function () {
12 const extension = TS_REGEX.test(this.resourcePath) ? '.ts' : '.tsx';
13 throw new Error(`sewing-kit could not parse ${chalk_1.default.bold(this.resourcePath.replace(this.rootContext, ''))} because ${extension} files depend on Typescript.\nIf this is a Typescript application, add Typescript as a dependency using ${chalk_1.default.bold('yarn add typescript')}`);
14};
\No newline at end of file