Skip to content

Commit

Permalink
simplify screen option text
Browse files Browse the repository at this point in the history
  • Loading branch information
budiadiono committed Dec 8, 2018
1 parent 67f758f commit 4b7b499
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libs/ext.utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class Utils {
return dirs
}

async dirNamesDeep(dir: string) {
async dirNamesDeep(dir: string): Promise<string[]> {
const res = []
let id = 0

Expand Down
5 changes: 2 additions & 3 deletions src/libs/ext.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class View {
async createClassView(kind: ViewKind, name: string, path: string, props: any, location: string) {
const { utils } = this.context
const fileList = ['index.tsx', 'props.ts']

if (props.withState) {
fileList.push('state.ts')
}
Expand Down Expand Up @@ -130,7 +130,6 @@ class View {
const {
filesystem: { exists },
utils,
strings: { padEnd },
} = this.context

const dirs = await utils.dirNamesDeep(`src/views/${kind}s${dir}`)
Expand All @@ -144,7 +143,7 @@ class View {
if (briefInfo) {
infoList.push(<ViewInfo>{
path: d,
option: padEnd(briefInfo.name + ' ', 20, '─') + ' ' + d,
option: `${briefInfo.name} [${d.substr(1, d.length - 1)}]`,
...briefInfo,
})
}
Expand Down

0 comments on commit 4b7b499

Please sign in to comment.