Skip to content

Commit

Permalink
redesign library structure
Browse files Browse the repository at this point in the history
  • Loading branch information
distrue committed Nov 4, 2020
1 parent 0020d6f commit ef846a6
Show file tree
Hide file tree
Showing 29 changed files with 816 additions and 436 deletions.
34 changes: 34 additions & 0 deletions example/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import {SkillResponse as Resp} from '../lib';

const bare = new Resp();
bare.template.addBareOutput({
type: 'basic',
title: '안녕하세요',
thumbnail: 'http://k.kakaocdn.net/dn/bSxJ8y/btqF02kThBu/4ZjrER4JOjU4okzstNsUY1/img_640x640.jpg',
desc: '반갑습니다'
});
bare.template
.getOutputasBare(0)
.getCardasBasic()
.addBlockBtn({
label: '버튼',
messageText: '메세지',
blockId: "id",
});
console.log(JSON.stringify(bare.json()));

const carousel = new Resp();
carousel.template.addCarouselOutput('basicCard');
const out = carousel.template.getOutputasCarousel(0);
out.addCarouselCell({
title: 'carousel',
desc: 'Heloo',
thumbnail: 'http://k.kakaocdn.net/dn/bSxJ8y/btqF02kThBu/4ZjrER4JOjU4okzstNsUY1/img_640x640.jpg'
});
out.addCarouselCell({
title: 'carousel',
desc: 'Heloo',
thumbnail: 'http://k.kakaocdn.net/dn/bSxJ8y/btqF02kThBu/4ZjrER4JOjU4okzstNsUY1/img_640x640.jpg'
}); // if it is not CarouselCell, error occurs

console.log(JSON.stringify(carousel.json()));
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export class SkillResponse {
}
}

export {Output, Card, Cmpnts, QuickReply, Template} from './template';
export * from './template';
70 changes: 0 additions & 70 deletions lib/template/card/basiccard.ts

This file was deleted.

10 changes: 0 additions & 10 deletions lib/template/card/index.ts

This file was deleted.

86 changes: 0 additions & 86 deletions lib/template/card/listcard.ts

This file was deleted.

129 changes: 0 additions & 129 deletions lib/template/cmpnts/button.ts

This file was deleted.

6 changes: 0 additions & 6 deletions lib/template/cmpnts/index.ts

This file was deleted.

Loading

0 comments on commit ef846a6

Please sign in to comment.