Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
+ import types cli
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDeved committed Feb 26, 2020
1 parent ff6d0ab commit ceffb1a
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 11 deletions.
2 changes: 2 additions & 0 deletions cli/questions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import inquirer from 'inquirer';
import { IQuestionOption } from './types/QuestionOption';
import { ILanguageOption } from './types/LangageOption';

export const askCreateDireflowSetup = async (): Promise<IQuestionOption> => {
return createQuestions('Direflow Setup');
Expand Down
3 changes: 0 additions & 3 deletions cli/types/Command.d.ts

This file was deleted.

3 changes: 3 additions & 0 deletions cli/types/Command.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface ICommand {
[arg: string]: string;
}
3 changes: 0 additions & 3 deletions cli/types/LangageOption.d.ts

This file was deleted.

3 changes: 3 additions & 0 deletions cli/types/LangageOption.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface ILanguageOption {
language: 'js' | 'ts';
}
2 changes: 1 addition & 1 deletion cli/types/Names.d.ts → cli/types/Names.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface INames {
export interface INames {
title: string;
pascal: string;
snake: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface IQuestionOption {
export interface IQuestionOption {
name: string;
description: string;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface ITemplateOption {
export interface ITemplateOption {
projectName: string;
language: 'ts' | 'js';
}
1 change: 1 addition & 0 deletions cli/utils/copyTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { resolve } from 'path';
import ncp from 'ncp';
import mkdirp from 'mkdirp';
import { ITemplateOption } from '../types/TemplateOption';

const copyTemplate = async (options: ITemplateOption): Promise<string> => {
const currentDirectory = process.cwd();
Expand Down
1 change: 1 addition & 0 deletions cli/utils/nameFormat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import to from 'to-case';
import { INames } from '../types/Names';

export const getNameFormats = (name: string): INames => {
return {
Expand Down
1 change: 1 addition & 0 deletions cli/utils/writeNames.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import fs from 'fs';
import handelbars from 'handlebars';
import path from 'path';
import { INames } from '../types/Names';

const packageJson = require('../../package.json');

Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"strict": true,
"esModuleInterop": true,
"moduleResolution": "node",
"skipLibCheck": true,
"typeRoots": ["cli/types", "node_modules/@types"]
"skipLibCheck": true
},
"exclude": [
"node_modules",
Expand Down

0 comments on commit ceffb1a

Please sign in to comment.