Skip to content

Commit

Permalink
type: modify type.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 30, 2024
1 parent 17a7e1e commit 1f632e1
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/babel/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import semver from 'semver';
import { TransformOptions } from '@babel/core';
import { type TransformOptions } from '@babel/core';
// @ts-ignore
import presetEnv from '@babel/preset-env';
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion packages/babel/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'fs-extra';
import path from 'node:path';
import { Log, getEmojiIcon, getExt, __dirname } from '@tsbb/typescript';
import { TransformOptions } from '@babel/core';
import { type TransformOptions } from '@babel/core';
import babelPluginJsx from '@vue/babel-plugin-jsx';
import { transform } from './transform.js';
import { getOutputPath } from './utils.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/babel/src/transform.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { transformFile, BabelFileResult, TransformOptions, loadPartialConfig } from '@babel/core';
import { transformFile, type BabelFileResult, type TransformOptions, loadPartialConfig } from '@babel/core';

export interface TransformBabelFileResult extends BabelFileResult {
options: TransformOptions;
Expand Down
2 changes: 1 addition & 1 deletion packages/babel/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'node:path';
import { getRootsFolderName, __dirname } from '@tsbb/typescript';
import { BabelCompileOptions } from './index.js';
import { type BabelCompileOptions } from './index.js';

/**
* Convert suffix
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/compile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tsCompile, { findConfigFile, readConfigFile, reportDiagnostic } from '@tsbb/typescript';
import { BabelCompileOptions } from '@tsbb/babel';
import { type BabelCompileOptions } from '@tsbb/babel';
import { babelTransform } from './watcher/babelTransform.js';
import { watcherCopyFiles } from './watcher/copyFiles.js';

Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/copy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import path from 'node:path';
import fs from 'fs-extra';
import chokidar from 'chokidar';
import { Log, CopyFilesOptions } from '@tsbb/typescript';
import { watcherCopyFiles } from './watcher/copyFiles.js';
import { Log } from '@tsbb/typescript';

export interface CopyOption {
entry?: string[];
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { glob } from 'glob';
import jest, { JestOptions } from '@tsbb/jest';
import { Log } from '@tsbb/typescript';
import { helpStr } from './helpStr.js';
import { compile, CompileOptions } from './compile.js';
import { copy, CopyOption } from './copy.js';
import { compile, type CompileOptions } from './compile.js';
import { copy, type CopyOption } from './copy.js';

export * from './watcher/copyFiles.js';

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/watcher/babelTransform.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import babelCompile, { getOutputPath } from '@tsbb/babel';
import tsCompile, { findConfigFile, Log, getExt, getRootsFolderName, CopyFilesOptions } from '@tsbb/typescript';
import tsCompile, { findConfigFile, Log, getExt, getRootsFolderName, type CopyFilesOptions } from '@tsbb/typescript';
import path from 'node:path';
import ts from 'typescript';
import fs from 'fs-extra';
import { watcherCopyFiles } from '../watcher/copyFiles.js';
import { CompileOptions } from '../compile.js';
import { type CompileOptions } from '../compile.js';

export function babelTransform(options: CompileOptions = {}) {
const { cjs = 'lib', esm = 'esm' } = options;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/watcher/copyFiles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chokidar from 'chokidar';
import path from 'node:path';
import fs from 'fs-extra';
import { Log, CopyFilesOptions } from '@tsbb/typescript';
import { Log, type CopyFilesOptions } from '@tsbb/typescript';

/**
* Used to monitor file changes and copy related files, such as: xx.jpg
Expand Down

0 comments on commit 1f632e1

Please sign in to comment.