From fdbe5573bcdb273461fcc2befb470131884f6b51 Mon Sep 17 00:00:00 2001 From: Joshua Daniel Pratt Nielsen Date: Tue, 13 Feb 2024 16:47:34 +0100 Subject: [PATCH] feat: export typescript This allows downstream users to use a different version of typescript. --- example/blueprints/block/index.ts | 4 +++- example/blueprints/template/index.ts | 5 ++++- src/index.ts | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/example/blueprints/block/index.ts b/example/blueprints/block/index.ts index 535c034..4a5de94 100644 --- a/example/blueprints/block/index.ts +++ b/example/blueprints/block/index.ts @@ -5,10 +5,12 @@ import { patchTsFile, runner, assembleTemplate, + ts, } from '@jdpnielsen/assemble'; import path from 'path'; -import { SyntaxKind } from 'typescript'; + +const { SyntaxKind } = ts; runner(async (context: AssembleContext) => { const answers = await prompt<{ name: string }>([ diff --git a/example/blueprints/template/index.ts b/example/blueprints/template/index.ts index 617f20d..ce28316 100644 --- a/example/blueprints/template/index.ts +++ b/example/blueprints/template/index.ts @@ -5,9 +5,12 @@ import { runner, assembleTemplate, patchTsFile, + ts, } from '@jdpnielsen/assemble'; + import path from 'node:path'; -import { SyntaxKind } from 'typescript'; + +const { SyntaxKind } = ts; runner(async (context: AssembleContext) => { const answers = await prompt<{ name: string }>([ diff --git a/src/index.ts b/src/index.ts index 4413cff..59466c7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ +import ts from 'typescript'; +export { ts }; export { prompt } from 'enquirer'; export { changeCase } from './lib/change-case'; export { runner } from './lib/runner';