@storm-stack/core
Version:
A build toolkit and runtime used by Storm Software in TypeScript applications
32 lines (26 loc) • 876 B
JavaScript
var chunkBRY5QOXV_cjs = require('./chunk-BRY5QOXV.cjs');
var chunkGRNJVY7I_cjs = require('./chunk-GRNJVY7I.cjs');
var ts = require('typescript');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var ts__default = /*#__PURE__*/_interopDefault(ts);
function transpile(context, id, code, options = {}) {
const transformer = chunkBRY5QOXV_cjs.createTransformer(context, options);
const declarationTransformer = chunkBRY5QOXV_cjs.createDeclarationTransformer(context, options);
return ts__default.default.transpileModule(code, {
compilerOptions: {
...context.tsconfig.options
},
fileName: id,
transformers: {
before: [
transformer
],
after: [
declarationTransformer
]
}
});
}
chunkGRNJVY7I_cjs.__name(transpile, "transpile");
exports.transpile = transpile;
;