Skip to content

Commit

Permalink
type: Export more types.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 19, 2021
1 parent 0caf4d2 commit 222d099
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion example/hapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"tsbb": "2.0.0"
},
"dependencies": {
"@babel/runtime": "^7.8.3",
"@babel/runtime": "7.12.5",
"@hapi/hapi": "^19.1.1"
}
}
3 changes: 2 additions & 1 deletion example/react-component-tsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@
"prop-types": "15.7.2"
},
"devDependencies": {
"@babel/runtime": "7.12.5",
"@kkt/less-modules": "6.2.0",
"@kkt/raw-modules": "6.2.0",
"@kkt/scope-plugin-options": "6.2.0",
"@types/react": "17.0.0",
"@types/react-dom": "17.0.0",
"compile-less-cli": "1.6.0",
"husky": "4.3.7",
"husky": "4.3.8",
"kkt": "6.2.0",
"lint-staged": "10.5.3",
"prettier": "2.2.1",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"build:hapi": "lerna exec \"npm run build\" --scope @template/hapi --stream",
"build:react-component": "lerna exec \"npm run build && npm run doc\" --scope @template/react-component --stream",
"build:react-component-tsx": "lerna exec \"npm run build\" --scope @template/react-component --stream",
"watch": "lerna exec \"tsc -p ./ --types --outDir lib --watch\" --scope tsbb --scope @tsbb/* --stream",
"build": "lerna exec \"tsc -p ./ --types --outDir lib\" --scope tsbb --scope @tsbb/* --stream",
"type-check": "lerna exec \"tsc --noEmit\" --scope tsbb --scope @tsbb/* --stream",
"watch": "lerna exec \"tsc -p ./ --types --outDir lib --watch\" --scope tsbb --stream",
"build": "lerna exec \"tsc -p ./ --types --outDir lib\" --scope tsbb --stream",
"type-check": "lerna exec \"tsc --noEmit\" --scope tsbb --stream",
"hoist": "lerna bootstrap --hoist",
"clean": "lerna clean --yes",
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
Expand Down
7 changes: 3 additions & 4 deletions packages/tsbb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
"name": "tsbb",
"version": "2.0.0",
"description": "TSBB is a zero-config CLI that helps you develop, test, and publish modern TypeScript project.",
"typings": "lib/index.d.ts",
"bin": {
"tsbb": "./lib/command/tsbb.js"
},
"repository": {
"type": "git",
"url": "https://github.com/jaywcjlove/tsbb.git"
},
"bugs": {
"url": "https://github.com/jaywcjlove/tsbb/issues"
},
"homepage": "https://github.com/jaywcjlove/tsbb",
"scripts": {
"type-check": "tsc --noEmit",
Expand Down Expand Up @@ -46,8 +44,9 @@
"@tsbb/babel-preset-tsbb": "1.12.1",
"@types/graceful-fs": "4.1.3",
"@types/node": "13.13.9",
"@types/jest": "26.0.14",
"@jest/types": "26.6.2",
"babel-jest": "26.6.3",
"chalk": "4.0.0",
"camelcase": "6.0.0",
"chokidar": "3.4.3",
"execa": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/tsbb/src/build/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Argv } from 'yargs';
import FS from 'fs-extra';
import babel from '../babel';
import getFileDirectory, { IFileDirStat } from '../utils/getFileDirectory';
import { getFileDirectory, IFileDirStat } from '../utils/getFileDirectory';
import { IMyYargsArgs, completePath } from '../utils';
import { publicOptions, helpOption } from '../command/options';
import { ITargets } from '../babel/transform';
Expand Down
2 changes: 1 addition & 1 deletion packages/tsbb/src/command/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Argv } from 'yargs';
import { IMyYargsArgs, completePath, run } from '../utils';
import { helpOption } from './options';
import { moverDir } from '../utils/moverDir';
import installDeps from '../utils/installDeps';
import { installDeps } from '../utils/installDeps';

export const command = 'create <project-name> [options]';
export const describe = 'Create a new project with TSBB';
Expand Down
6 changes: 6 additions & 0 deletions packages/tsbb/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from './utils/clearConsole'
export * from './utils/executeCommand'
export * from './utils/getFileDirectory'
export * from './utils'
export * from './utils/moverDir'
export * from './command/create'
2 changes: 1 addition & 1 deletion packages/tsbb/src/utils/getFileDirectory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ async function getFiles(rootPath: string, outpuPath: string, files: IFileDirStat
return files;
}

export default async (rootPath: string, outpuPath?: string) => {
export async function getFileDirectory(rootPath: string, outpuPath?: string) {
return await getFiles(rootPath, outpuPath, [], rootPath);
};
3 changes: 1 addition & 2 deletions packages/tsbb/src/utils/installDeps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import execa from 'execa';
import { executeCommand } from './executeCommand';

export default async (targetDir: string, command: string) => {
export async function installDeps(targetDir: string, command: string) {
const args = [];
args.push('install');
await executeCommand(command, args, targetDir);
Expand Down

0 comments on commit 222d099

Please sign in to comment.