SlideShare a Scribd company logo
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
StoryBook駆動で
新規システムの開発を試してみた
虎の穴ラボ 古賀
1
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
アジェンダ
1. 自己紹介
2. StoryBookとは?
3. インストール方法
4. StoryBook駆動開発の進めかた
5. メリット
6. まとめ
2
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
1. 自己紹介
出身地は佐賀です。三重県から地方勤務で虎の穴ラボの通販のチームにいます。
(2020年12月に虎の穴ラボに入社、二児の父です。)
フロントエンドは得意で、バックエンドのぼちぼちです。
推し
・南條愛乃(FripSideのVocal、とある科学の超電磁砲の
OPとか)
・Node.js/Java
・Nuxt.js/Tailwind CSS
3
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
2. StoryBookとは?
フロントエンドエンジニア向けのオープンソースのツールです。
👉 1. コンポーネント駆動型の UI を高速に開発する
👉 2. UI コンポーネントとページを分離して、開発できる
👉 3. UI の開発、テスト、およびドキュメント化を合理化できる
公式サイトより https://storybook.js.org/
4
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
インストールは簡単です!
5
Nuxt.js ならすぐに使い始められます!
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
2. インストール方法
Nuxt.js なら nuxt/storybook をインストールすると、
設定無しで、簡単に既存のNuxt.jsプロジェクトに導入できます
(素のVueやReactは公式通りのインストールができて簡単です)
公式サイト https://storybook.nuxtjs.org/
詳しくは、最近作った
Qiitaブログで!
6
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
Step1. npm インストール
7
Nuxt.js ならすぐに使い始められます!
@nuxtjs/storybook、postcssをインストール
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
Step2. .gitignoreに追記
8
Nuxt.js ならすぐに使い始められます!
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
Step3. nuxt.config.jsに追記
9
Nuxt.js ならすぐに使い始められます!
後は、npx nuxt storybookで起動!
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
3ステップで完了🎊
10
nuxt/storybook が無い時は手順が多くて大変でした、、、
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
3. StoryBook駆動開発の進めかた
👉 1. StroyBookで画面イメージを作る(ほぼ静的な HTML)
👉 2. 画面仕様を作る(StoryBook に Markdown で書く or スプレッドシートに貼る)
👉 3. チーム内で画面仕様のレビュー
👉 4. コンポーネントを整理・共通化する(storybook で動かしながら)
👉 5. バックエンドとの結合部分(ロジック)を書く(StoryBook に FetchAPI のモックを書く)
👉 6. Jest でテストケースを作る
11
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
Markdownで仕様を書ける!
🎊
12
Markdownで書けると捗りますよね、Documentation As Code 🙌
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
3-2. StoryBook に Markdown で仕様を書ける!
13
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
👉 使用例をコピーできる
3-2. StoryBook に Markdown で仕様を書ける!
14
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
👉 コンポーネントの属性の一覧を生成してくれる
3-2. StoryBook に Markdown で仕様を書ける!
15
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
3-2. StoryBook に Markdown で仕様を書ける!
16
👉 Markdown で仕様が書ける
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
3-2. StoryBook に Markdown で仕様を書ける!
17
👉 Markdown で仕様が書ける
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
3-2. StoryBook に Markdown で仕様を書ける!
18
👉 nuxt.config.js に追記が必要!
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
Fetch APIのモックを書ける!
🎊
19
APIが無くても開発進められる!
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
3-5. StoryBook に API のモックを書ける!
20
👉 下記のモックを書くと・・・
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
3-5. StoryBook に API のモックを書ける!
21
👉 FetchAPI(axios)の結果をモックに差し替えられます
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
モックのインストールが必要で
す
22
今回は storybook-addon-mock を使います
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
Step1. npm インストール
23
Nuxt.js ならすぐに使い始められます!
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
Step2. nuxt.config.js に追記
24
Nuxt.js ならすぐに使い始められます!
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
4. 得られるメリット
👉 1. ドキュメント作成と並行して開発が進められる
➡ その後の開発が楽に!
👉 2. 仕様が実際の画面で気軽に確認できる
➡ 実際の動きが誰でも(他の開発者、利用者など)
想像しやすい!
👉 3. バックエンドが無くても開発が進められる(無いこと前提に進める)
➡ スケジュール調整が楽になる!
25
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
全体の開発工数を抑えられる
🎊
26
設計工数↑開発工数↓↓
(実際の動きが想像しやすいので、仕様ミスが減る)
(バックエンドの進捗を気にせずに、コーディングが進められる)
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
仕様の確認も楽に
🎊
27
1. 〜画面で検索して〜エラーになったら、どうなったっけ?的な疑問も
2. 再利用する既存のコンポーネントを試しに動かしたい
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
これらが全てコードに、
🎊
28
スプレッドシートの管理が避けられる
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
まとめ
StoryBook駆動で新規システムの開発をやってみました。
今のところ、よく言われるStoryBookの陳腐化的なデメリットは感じて無いです。
(スプレッドシートよりは良い感じ、
Vue+StoryBookの情報が少なくてたまに詰まるのが困る。
JSX使いたい。)
全体の開発工数を下げつつ、コンポーネントの管理も楽になるので、
よろしければ、お試しください😉
(最後のスライド以降に、利用したソースコードを記載)
29
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
ご静聴、ありがとうございました
30
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
Appendix
31
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
32
<!-- components/molcules/TextboxLabel.vue -->
<template>
<div class="tw-relative tw-mb-4">
<label :for="id" class="tw-leading-7 tw-text-sm tw-text-gray-600">
<slot></slot>
</label>
<atoms-html-textbox
class="textbox"
:id="id"
:value="value"
:type="type"
:placeholder="placeholder"
:disabled="disabled"
@input="emitEvent($event, 'input')"
@search="emitEvent($event, 'search')"
@enter="emitEvent($event, 'enter')"
>
</atoms-html-textbox>
</div>
</template>
<script>
export default {
props: {
id: { type: String, required: false, default: '' },
type: { type: String, required: false, default: 'text' },
value: { type: String, required: false, default: '' },
placeholder: { type: String, required: false, default: '' },
disabled: { type: Boolean, required: false, default: false },
},
methods: {
emitEvent(eventValue, eventName) {
this.$emit(eventName, eventValue)
},
},
}
</script>
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
33
// components/molcules/TextboxLabel.stories.js
export default {
title: 'molcules/TextboxLabelMdx',
}
export const Basic = ({}) => ({
template:
'<molcules-textbox-label :type="type" :value="value">Basic</molcules-textbox-label>',
props: {
type: {
default: 'text',
},
value: {
default: 'Basic',
},
},
})
Basic.argTypes = {
type: {
control: {
type: 'select',
options: ['text', 'search', 'password'],
},
defaultValue: 'text',
},
value: {
control: 'text',
defaultValue: '',
},
}
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
34
<!-- components/molcules/TextboxLabel.stories.mdx -->
import { Meta, Story, Props } from '@storybook/addon-docs/blocks'
import { action } from '@storybook/addon-actions'
import MolculesTextboxLabel from './TextboxLabel'
<Meta title="molcules/TextboxLabelMdx" component={MolculesTextboxLabel} />
# This is an awesome button
Some **markdown** description, or whatever you want.
## Example
サンプル
<Story name="Basic" args={{ type: 'text', value: 'Basic' }}>
{{
template:
'<molcules-textbox-label :type="type" :value="value">Basic</molcules-textbox-label>',
props: {
type: {
default: 'text',
},
value: {
default: 'Basic',
},
},
}}
</Story>
```html
<molcules-textbox-label :type="text" :value="Basic" />
```
## Props
<Props of={MolculesTextboxLabel} />
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
35
<!-- components/atoms/html/Textbox.vue -->
<template>
<input
:id="id"
ref="textbox"
:value="value"
:type="type"
:placeholder="placeholder"
:disabled="disabled"
:required="required"
@input="$emit('input', $event.target.value)"
@search="$emit('search', $event.target.value)"
@keydown.enter="$emit('enter', $event.target.value)"
/>
</template>
<script>
export default {
props: {
id: { type: String, required: false, default: '' },
type: { type: String, required: false, default: 'text' },
value: { type: String, required: false, default: '' },
placeholder: { type: String, required: false, default: '' },
disabled: { type: Boolean, required: false, default: false },
required: { type: Boolean, required: false, default: false },
},
}
</script>
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
36
<!-- components/molcules/el/RadioGroupRadioListLabel.vue -->
<template>
<atoms-el-col :span="span">
<div class="tw-text-xs tw-text-gray-600"><slot></slot></div>
<atoms-el-radio-group
ref="atoms-el-radio-group"
:value="value"
:disabled="disabled"
@input="input"
@change="change"
>
<atoms-el-radio
v-if="isVisibleAll"
:label="$constants.SELECT_NUMBER_ALL_VALUE"
>全て</atoms-el-radio
>
<atoms-el-radio
v-for="option in options"
:key="option.key"
:label="option.key"
>{{ option.label }}</atoms-el-radio
>
</atoms-el-radio-group>
</atoms-el-col>
</template>
<script>
export default {
props: {
isVisibleAll: { type: Boolean, required: false, default: true },
value: {
type: [String, Number, Boolean],
required: false,
default: undefined,
},
disabled: { type: Boolean, required: false, default: false },
span: { type: Number, required: false, default: null },
options: {
type: [Array, Object],
required: false,
default: () => {
return []
},
},
},
methods: {
input(value) {
this.$emit('input', value)
},
change(value) {
this.$emit('change', value)
},
},
}
</script>
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
37
// components/molcules/el/RadioGroupRadioListLabel.stories.js
import RadioGroupRadioListLabel from './RadioGroupRadioListLabel'
export default {
title: 'molcules/el/RadioGroupRadioListLabel',
component: RadioGroupRadioListLabel,
argTypes: {},
}
// eslint-disable-next-line no-empty-pattern
export const Basic = (_args, { argTypes }) => ({
components: { RadioGroupRadioListLabel },
props: Object.keys(argTypes),
template:
'<molcules-el-radio-group-radio-list-label v-bind="$props">Basic</molcules-el-radio-group-radio-list-label>',
})
Basic.args = {
options: [
{ key: 777, label: 'メイドちゃん1' },
{ key: 888, label: 'メイドちゃん2' },
],
value: -1,
}
export const NotAll = (_args, { argTypes }) => ({
components: { RadioGroupRadioListLabel },
props: Object.keys(argTypes),
template:
'<molcules-el-radio-group-radio-list-label v-bind="$props">NotAll</molcules-el-radio-group-radio-list-label>',
})
NotAll.args = {
options: [
{ key: 777, label: 'メイドちゃん1' },
{ key: 888, label: 'メイドちゃん2' },
],
value: 8,
isVisibleAll: false,
}
Copyright  (C) 2021 Toranoana Inc. All Rights Reserved.
38
// components/molcules/el/RadioGroupRadioListLabel.stories.mdx
import { Meta, Story, Props, Canvas } from '@storybook/addon-docs/blocks'
import { action } from '@storybook/addon-actions'
import RadioGroupRadioListLabel from './RadioGroupRadioListLabel'
<Meta
title="molcules/el/RadioGroupRadioListLabel/Mdx"
component={RadioGroupRadioListLabel}
/>
# 概要
ElementUI のラジオボタン+テキストラベル、el-col を組み合わせた、Molcule コンポーネントです。
## サンプル
### 表示
export const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { RadioGroupRadioListLabel },
template:
'<molcules-el-radio-group-radio-list-label
v-bind="$props">NotAll</molcules-el-radio-group-radio-list-label>',
viewMode: 'docs',
})
<Canvas>
<Story
name="Basic"
args={{
options: [
{ key: 777, label: 'メイドちゃん1' },
{ key: 888, label: 'メイドちゃん2' },
],
value: -1,
}}
>
{Template.bind({})}
</Story>
</Canvas>
### コード
```html
<molcules-el-radio-group-radio-list-label
v-model="プロパティの名前"
:span="8"
:options="[
{ key: 7, label: 'メイドちゃん1' },
{ key: 8, label: 'メイドちゃん2' },
]"
>
NotAll
</molcules-el-radio-group-radio-list-label>
```
## 補足
- span は ElementUI の el-col タグの span 値になります。
- デフォルトのスロットは、ラベル名になります。
## 属性
<Props of={RadioGroupRadioListLabel} />

More Related Content

Similar to 20210809 story book_driven_new_system_development_nuxtjs (20)

PuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With Notes
Phil Zimmerman
 
Running Word2Vec with Chinese Wikipedia dump
Running Word2Vec with Chinese Wikipedia dumpRunning Word2Vec with Chinese Wikipedia dump
Running Word2Vec with Chinese Wikipedia dump
Billy Yang
 
Spring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good partsSpring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good parts
Jarek Ratajski
 
Secure Node Code (workshop, O'Reilly Security)
Secure Node Code (workshop, O'Reilly Security)Secure Node Code (workshop, O'Reilly Security)
Secure Node Code (workshop, O'Reilly Security)
Guy Podjarny
 
Cyber Security Workshop Presentation.pptx
Cyber Security Workshop Presentation.pptxCyber Security Workshop Presentation.pptx
Cyber Security Workshop Presentation.pptx
YashSomalkar
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
Chui-Wen Chiu
 
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
Rocking the microservice world with Helidon-LAOUCTour2023.pdfRocking the microservice world with Helidon-LAOUCTour2023.pdf
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
Alberto Salazar
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
Mike Hagedorn
 
From printed circuit boards to exploits
From printed circuit boards to exploitsFrom printed circuit boards to exploits
From printed circuit boards to exploits
virtualabs
 
Hacktoberfest'24 _ GDG on Campus BU.pptx
Hacktoberfest'24 _ GDG on Campus BU.pptxHacktoberfest'24 _ GDG on Campus BU.pptx
Hacktoberfest'24 _ GDG on Campus BU.pptx
nilaygupta3003
 
Gen AI with LLM for construction technology
Gen AI with LLM for construction technologyGen AI with LLM for construction technology
Gen AI with LLM for construction technology
Tae wook kang
 
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-TestingJava Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Tal Melamed
 
支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒
Toki Kanno
 
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft..."Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
Dataconomy Media
 
Bone.io for HTML5 Apps
Bone.io for HTML5 AppsBone.io for HTML5 Apps
Bone.io for HTML5 Apps
Brad Carleton
 
Creating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTPCreating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTP
nsandonato
 
Kubernetes: Learning from Zero to Production
Kubernetes: Learning from Zero to ProductionKubernetes: Learning from Zero to Production
Kubernetes: Learning from Zero to Production
Rosemary Wang
 
Eight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameEight Rules for Making Your First Great Game
Eight Rules for Making Your First Great Game
Nick Pruehs
 
writing self-modifying code and utilizing advanced assembly techniques
writing self-modifying code and utilizing advanced assembly techniqueswriting self-modifying code and utilizing advanced assembly techniques
writing self-modifying code and utilizing advanced assembly techniques
Russell Sanford
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet
 
PuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With Notes
Phil Zimmerman
 
Running Word2Vec with Chinese Wikipedia dump
Running Word2Vec with Chinese Wikipedia dumpRunning Word2Vec with Chinese Wikipedia dump
Running Word2Vec with Chinese Wikipedia dump
Billy Yang
 
Spring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good partsSpring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good parts
Jarek Ratajski
 
Secure Node Code (workshop, O'Reilly Security)
Secure Node Code (workshop, O'Reilly Security)Secure Node Code (workshop, O'Reilly Security)
Secure Node Code (workshop, O'Reilly Security)
Guy Podjarny
 
Cyber Security Workshop Presentation.pptx
Cyber Security Workshop Presentation.pptxCyber Security Workshop Presentation.pptx
Cyber Security Workshop Presentation.pptx
YashSomalkar
 
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
Rocking the microservice world with Helidon-LAOUCTour2023.pdfRocking the microservice world with Helidon-LAOUCTour2023.pdf
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
Alberto Salazar
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
Mike Hagedorn
 
From printed circuit boards to exploits
From printed circuit boards to exploitsFrom printed circuit boards to exploits
From printed circuit boards to exploits
virtualabs
 
Hacktoberfest'24 _ GDG on Campus BU.pptx
Hacktoberfest'24 _ GDG on Campus BU.pptxHacktoberfest'24 _ GDG on Campus BU.pptx
Hacktoberfest'24 _ GDG on Campus BU.pptx
nilaygupta3003
 
Gen AI with LLM for construction technology
Gen AI with LLM for construction technologyGen AI with LLM for construction technology
Gen AI with LLM for construction technology
Tae wook kang
 
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-TestingJava Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Tal Melamed
 
支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒
Toki Kanno
 
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft..."Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
Dataconomy Media
 
Bone.io for HTML5 Apps
Bone.io for HTML5 AppsBone.io for HTML5 Apps
Bone.io for HTML5 Apps
Brad Carleton
 
Creating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTPCreating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTP
nsandonato
 
Kubernetes: Learning from Zero to Production
Kubernetes: Learning from Zero to ProductionKubernetes: Learning from Zero to Production
Kubernetes: Learning from Zero to Production
Rosemary Wang
 
Eight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameEight Rules for Making Your First Great Game
Eight Rules for Making Your First Great Game
Nick Pruehs
 
writing self-modifying code and utilizing advanced assembly techniques
writing self-modifying code and utilizing advanced assembly techniqueswriting self-modifying code and utilizing advanced assembly techniques
writing self-modifying code and utilizing advanced assembly techniques
Russell Sanford
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet
 

More from 虎の穴 開発室 (20)

FizzBuzzで学ぶJavaの進化
FizzBuzzで学ぶJavaの進化FizzBuzzで学ぶJavaの進化
FizzBuzzで学ぶJavaの進化
虎の穴 開発室
 
Railsのデバッグ どうやるかを改めて確認する
Railsのデバッグ どうやるかを改めて確認するRailsのデバッグ どうやるかを改めて確認する
Railsのデバッグ どうやるかを改めて確認する
虎の穴 開発室
 
虎の穴ラボ エンジニア採用説明資料 .pdf
虎の穴ラボ エンジニア採用説明資料 .pdf虎の穴ラボ エンジニア採用説明資料 .pdf
虎の穴ラボ エンジニア採用説明資料 .pdf
虎の穴 開発室
 
Deno Deployと組み合わせるのに Upstashをおすすめしたい.pdf
Deno Deployと組み合わせるのに Upstashをおすすめしたい.pdfDeno Deployと組み合わせるのに Upstashをおすすめしたい.pdf
Deno Deployと組み合わせるのに Upstashをおすすめしたい.pdf
虎の穴 開発室
 
toranoana.deno #6 アジェンダ 採用説明
toranoana.deno #6 アジェンダ 採用説明toranoana.deno #6 アジェンダ 採用説明
toranoana.deno #6 アジェンダ 採用説明
虎の穴 開発室
 
Deno 向け WEB 開発用のツールを作ったので 紹介します
Deno 向け WEB 開発用のツールを作ったので 紹介しますDeno 向け WEB 開発用のツールを作ったので 紹介します
Deno 向け WEB 開発用のツールを作ったので 紹介します
虎の穴 開発室
 
Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –
Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –
Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –
虎の穴 開発室
 
GCPの画像認識APIの紹介
GCPの画像認識APIの紹介 GCPの画像認識APIの紹介
GCPの画像認識APIの紹介
虎の穴 開発室
 
【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと
【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと
【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと
虎の穴 開発室
 
GitHub APIとfreshで遊ぼう
GitHub APIとfreshで遊ぼうGitHub APIとfreshで遊ぼう
GitHub APIとfreshで遊ぼう
虎の穴 開発室
 
通販開発部の西田さん「通販開発マネジメントの5ルール」
通販開発部の西田さん「通販開発マネジメントの5ルール」通販開発部の西田さん「通販開発マネジメントの5ルール」
通販開発部の西田さん「通販開発マネジメントの5ルール」
虎の穴 開発室
 
社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!
社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!
社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!
虎の穴 開発室
 
セキュリティを強化しよう!CloudArmorの機能解説
セキュリティを強化しよう!CloudArmorの機能解説セキュリティを強化しよう!CloudArmorの機能解説
セキュリティを強化しよう!CloudArmorの機能解説
虎の穴 開発室
 
JavaScript LT会 〜 React.js Node.js歓迎 〜 Deno で やってみるweb開発
JavaScript LT会 〜 React.js   Node.js歓迎 〜 Deno で やってみるweb開発JavaScript LT会 〜 React.js   Node.js歓迎 〜 Deno で やってみるweb開発
JavaScript LT会 〜 React.js Node.js歓迎 〜 Deno で やってみるweb開発
虎の穴 開発室
 
Amplify Studioを使ってみた
Amplify Studioを使ってみたAmplify Studioを使ってみた
Amplify Studioを使ってみた
虎の穴 開発室
 
いいテスト会 (スプリントレビュー) をやろう!
いいテスト会 (スプリントレビュー) をやろう!いいテスト会 (スプリントレビュー) をやろう!
いいテスト会 (スプリントレビュー) をやろう!
虎の穴 開発室
 
【Saitama.js】Denoのすすめ
【Saitama.js】Denoのすすめ【Saitama.js】Denoのすすめ
【Saitama.js】Denoのすすめ
虎の穴 開発室
 
虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について
虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について
虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について
虎の穴 開発室
 
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜	【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
虎の穴 開発室
 
虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント
虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント 虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント
虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント
虎の穴 開発室
 
Railsのデバッグ どうやるかを改めて確認する
Railsのデバッグ どうやるかを改めて確認するRailsのデバッグ どうやるかを改めて確認する
Railsのデバッグ どうやるかを改めて確認する
虎の穴 開発室
 
虎の穴ラボ エンジニア採用説明資料 .pdf
虎の穴ラボ エンジニア採用説明資料 .pdf虎の穴ラボ エンジニア採用説明資料 .pdf
虎の穴ラボ エンジニア採用説明資料 .pdf
虎の穴 開発室
 
Deno Deployと組み合わせるのに Upstashをおすすめしたい.pdf
Deno Deployと組み合わせるのに Upstashをおすすめしたい.pdfDeno Deployと組み合わせるのに Upstashをおすすめしたい.pdf
Deno Deployと組み合わせるのに Upstashをおすすめしたい.pdf
虎の穴 開発室
 
toranoana.deno #6 アジェンダ 採用説明
toranoana.deno #6 アジェンダ 採用説明toranoana.deno #6 アジェンダ 採用説明
toranoana.deno #6 アジェンダ 採用説明
虎の穴 開発室
 
Deno 向け WEB 開発用のツールを作ったので 紹介します
Deno 向け WEB 開発用のツールを作ったので 紹介しますDeno 向け WEB 開発用のツールを作ったので 紹介します
Deno 向け WEB 開発用のツールを作ったので 紹介します
虎の穴 開発室
 
Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –
Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –
Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –
虎の穴 開発室
 
【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと
【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと
【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと
虎の穴 開発室
 
通販開発部の西田さん「通販開発マネジメントの5ルール」
通販開発部の西田さん「通販開発マネジメントの5ルール」通販開発部の西田さん「通販開発マネジメントの5ルール」
通販開発部の西田さん「通販開発マネジメントの5ルール」
虎の穴 開発室
 
社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!
社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!
社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!
虎の穴 開発室
 
セキュリティを強化しよう!CloudArmorの機能解説
セキュリティを強化しよう!CloudArmorの機能解説セキュリティを強化しよう!CloudArmorの機能解説
セキュリティを強化しよう!CloudArmorの機能解説
虎の穴 開発室
 
JavaScript LT会 〜 React.js Node.js歓迎 〜 Deno で やってみるweb開発
JavaScript LT会 〜 React.js   Node.js歓迎 〜 Deno で やってみるweb開発JavaScript LT会 〜 React.js   Node.js歓迎 〜 Deno で やってみるweb開発
JavaScript LT会 〜 React.js Node.js歓迎 〜 Deno で やってみるweb開発
虎の穴 開発室
 
Amplify Studioを使ってみた
Amplify Studioを使ってみたAmplify Studioを使ってみた
Amplify Studioを使ってみた
虎の穴 開発室
 
いいテスト会 (スプリントレビュー) をやろう!
いいテスト会 (スプリントレビュー) をやろう!いいテスト会 (スプリントレビュー) をやろう!
いいテスト会 (スプリントレビュー) をやろう!
虎の穴 開発室
 
【Saitama.js】Denoのすすめ
【Saitama.js】Denoのすすめ【Saitama.js】Denoのすすめ
【Saitama.js】Denoのすすめ
虎の穴 開発室
 
虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について
虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について
虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について
虎の穴 開発室
 
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜	【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
虎の穴 開発室
 
虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント
虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント 虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント
虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント
虎の穴 開発室
 

Recently uploaded (20)

Von karman Equation full derivation .pdf
Von karman Equation full derivation  .pdfVon karman Equation full derivation  .pdf
Von karman Equation full derivation .pdf
Er. Gurmeet Singh
 
TM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdfTM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdf
ChungLe60
 
Sorting Algorithms: Bubble Sort, Selection Sort,
Sorting Algorithms: Bubble Sort, Selection Sort,Sorting Algorithms: Bubble Sort, Selection Sort,
Sorting Algorithms: Bubble Sort, Selection Sort,
Dr. Madhuri Jawale
 
Improving Surgical Robot Performance Through Seal Design.pdf
Improving Surgical Robot Performance Through Seal Design.pdfImproving Surgical Robot Performance Through Seal Design.pdf
Improving Surgical Robot Performance Through Seal Design.pdf
BSEmarketing
 
The Golden Gate Bridge a structural marvel inspired by mother nature.pptx
The Golden Gate Bridge a structural marvel inspired by mother nature.pptxThe Golden Gate Bridge a structural marvel inspired by mother nature.pptx
The Golden Gate Bridge a structural marvel inspired by mother nature.pptx
AkankshaRawat75
 
Biases, our brain and software development
Biases, our brain and software developmentBiases, our brain and software development
Biases, our brain and software development
Matias Iacono
 
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptxMathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
ppkmurthy2006
 
health safety and environment presentation
health safety and environment presentationhealth safety and environment presentation
health safety and environment presentation
ssuserc606c7
 
Wireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdfWireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdf
AbhinandanMishra30
 
Design of cannal by Kennedy Theory full problem solved
Design of cannal by Kennedy Theory full problem solvedDesign of cannal by Kennedy Theory full problem solved
Design of cannal by Kennedy Theory full problem solved
Er. Gurmeet Singh
 
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptxUNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
KesavanT10
 
Introduction to Safety, Health & Environment
Introduction to Safety, Health  & EnvironmentIntroduction to Safety, Health  & Environment
Introduction to Safety, Health & Environment
ssuserc606c7
 
IoT-based-Electrical-Motor-Fault-Detection-System.pptx
IoT-based-Electrical-Motor-Fault-Detection-System.pptxIoT-based-Electrical-Motor-Fault-Detection-System.pptx
IoT-based-Electrical-Motor-Fault-Detection-System.pptx
atharvapardeshi03
 
Dijkstra Shortest Path Algorithm in Network.ppt
Dijkstra Shortest Path Algorithm in Network.pptDijkstra Shortest Path Algorithm in Network.ppt
Dijkstra Shortest Path Algorithm in Network.ppt
RAJASEKARAN G
 
Practice Head Torpedo - Neometrix Defence.pptx
Practice Head Torpedo - Neometrix Defence.pptxPractice Head Torpedo - Neometrix Defence.pptx
Practice Head Torpedo - Neometrix Defence.pptx
Neometrix_Engineering_Pvt_Ltd
 
Helium Boosting & Decanting With Hydro Test Machine
Helium Boosting & Decanting With Hydro Test MachineHelium Boosting & Decanting With Hydro Test Machine
Helium Boosting & Decanting With Hydro Test Machine
Paskals Fluid Systems Pvt. Ltd.
 
AI-Powered Power Converter Design Workflow.pdf
AI-Powered Power Converter Design Workflow.pdfAI-Powered Power Converter Design Workflow.pdf
AI-Powered Power Converter Design Workflow.pdf
Aleksandr Terlo
 
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
prasadmutkule1
 
Designing Flex and Rigid-Flex PCBs to Prevent Failure
Designing Flex and Rigid-Flex PCBs to Prevent FailureDesigning Flex and Rigid-Flex PCBs to Prevent Failure
Designing Flex and Rigid-Flex PCBs to Prevent Failure
Epec Engineered Technologies
 
Common Network Architecture:X.25 Networks, Ethernet (Standard and Fast): fram...
Common Network Architecture:X.25 Networks, Ethernet (Standard and Fast): fram...Common Network Architecture:X.25 Networks, Ethernet (Standard and Fast): fram...
Common Network Architecture:X.25 Networks, Ethernet (Standard and Fast): fram...
SnehPrasad2
 
Von karman Equation full derivation .pdf
Von karman Equation full derivation  .pdfVon karman Equation full derivation  .pdf
Von karman Equation full derivation .pdf
Er. Gurmeet Singh
 
TM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdfTM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdf
ChungLe60
 
Sorting Algorithms: Bubble Sort, Selection Sort,
Sorting Algorithms: Bubble Sort, Selection Sort,Sorting Algorithms: Bubble Sort, Selection Sort,
Sorting Algorithms: Bubble Sort, Selection Sort,
Dr. Madhuri Jawale
 
Improving Surgical Robot Performance Through Seal Design.pdf
Improving Surgical Robot Performance Through Seal Design.pdfImproving Surgical Robot Performance Through Seal Design.pdf
Improving Surgical Robot Performance Through Seal Design.pdf
BSEmarketing
 
The Golden Gate Bridge a structural marvel inspired by mother nature.pptx
The Golden Gate Bridge a structural marvel inspired by mother nature.pptxThe Golden Gate Bridge a structural marvel inspired by mother nature.pptx
The Golden Gate Bridge a structural marvel inspired by mother nature.pptx
AkankshaRawat75
 
Biases, our brain and software development
Biases, our brain and software developmentBiases, our brain and software development
Biases, our brain and software development
Matias Iacono
 
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptxMathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
ppkmurthy2006
 
health safety and environment presentation
health safety and environment presentationhealth safety and environment presentation
health safety and environment presentation
ssuserc606c7
 
Wireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdfWireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdf
AbhinandanMishra30
 
Design of cannal by Kennedy Theory full problem solved
Design of cannal by Kennedy Theory full problem solvedDesign of cannal by Kennedy Theory full problem solved
Design of cannal by Kennedy Theory full problem solved
Er. Gurmeet Singh
 
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptxUNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
KesavanT10
 
Introduction to Safety, Health & Environment
Introduction to Safety, Health  & EnvironmentIntroduction to Safety, Health  & Environment
Introduction to Safety, Health & Environment
ssuserc606c7
 
IoT-based-Electrical-Motor-Fault-Detection-System.pptx
IoT-based-Electrical-Motor-Fault-Detection-System.pptxIoT-based-Electrical-Motor-Fault-Detection-System.pptx
IoT-based-Electrical-Motor-Fault-Detection-System.pptx
atharvapardeshi03
 
Dijkstra Shortest Path Algorithm in Network.ppt
Dijkstra Shortest Path Algorithm in Network.pptDijkstra Shortest Path Algorithm in Network.ppt
Dijkstra Shortest Path Algorithm in Network.ppt
RAJASEKARAN G
 
AI-Powered Power Converter Design Workflow.pdf
AI-Powered Power Converter Design Workflow.pdfAI-Powered Power Converter Design Workflow.pdf
AI-Powered Power Converter Design Workflow.pdf
Aleksandr Terlo
 
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
prasadmutkule1
 
Designing Flex and Rigid-Flex PCBs to Prevent Failure
Designing Flex and Rigid-Flex PCBs to Prevent FailureDesigning Flex and Rigid-Flex PCBs to Prevent Failure
Designing Flex and Rigid-Flex PCBs to Prevent Failure
Epec Engineered Technologies
 
Common Network Architecture:X.25 Networks, Ethernet (Standard and Fast): fram...
Common Network Architecture:X.25 Networks, Ethernet (Standard and Fast): fram...Common Network Architecture:X.25 Networks, Ethernet (Standard and Fast): fram...
Common Network Architecture:X.25 Networks, Ethernet (Standard and Fast): fram...
SnehPrasad2
 

20210809 story book_driven_new_system_development_nuxtjs

  • 1. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. StoryBook駆動で 新規システムの開発を試してみた 虎の穴ラボ 古賀 1
  • 2. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. アジェンダ 1. 自己紹介 2. StoryBookとは? 3. インストール方法 4. StoryBook駆動開発の進めかた 5. メリット 6. まとめ 2
  • 3. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 1. 自己紹介 出身地は佐賀です。三重県から地方勤務で虎の穴ラボの通販のチームにいます。 (2020年12月に虎の穴ラボに入社、二児の父です。) フロントエンドは得意で、バックエンドのぼちぼちです。 推し ・南條愛乃(FripSideのVocal、とある科学の超電磁砲の OPとか) ・Node.js/Java ・Nuxt.js/Tailwind CSS 3
  • 4. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 2. StoryBookとは? フロントエンドエンジニア向けのオープンソースのツールです。 👉 1. コンポーネント駆動型の UI を高速に開発する 👉 2. UI コンポーネントとページを分離して、開発できる 👉 3. UI の開発、テスト、およびドキュメント化を合理化できる 公式サイトより https://storybook.js.org/ 4
  • 5. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. インストールは簡単です! 5 Nuxt.js ならすぐに使い始められます!
  • 6. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 2. インストール方法 Nuxt.js なら nuxt/storybook をインストールすると、 設定無しで、簡単に既存のNuxt.jsプロジェクトに導入できます (素のVueやReactは公式通りのインストールができて簡単です) 公式サイト https://storybook.nuxtjs.org/ 詳しくは、最近作った Qiitaブログで! 6
  • 7. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. Step1. npm インストール 7 Nuxt.js ならすぐに使い始められます! @nuxtjs/storybook、postcssをインストール
  • 8. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. Step2. .gitignoreに追記 8 Nuxt.js ならすぐに使い始められます!
  • 9. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. Step3. nuxt.config.jsに追記 9 Nuxt.js ならすぐに使い始められます! 後は、npx nuxt storybookで起動!
  • 10. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 3ステップで完了🎊 10 nuxt/storybook が無い時は手順が多くて大変でした、、、
  • 11. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 3. StoryBook駆動開発の進めかた 👉 1. StroyBookで画面イメージを作る(ほぼ静的な HTML) 👉 2. 画面仕様を作る(StoryBook に Markdown で書く or スプレッドシートに貼る) 👉 3. チーム内で画面仕様のレビュー 👉 4. コンポーネントを整理・共通化する(storybook で動かしながら) 👉 5. バックエンドとの結合部分(ロジック)を書く(StoryBook に FetchAPI のモックを書く) 👉 6. Jest でテストケースを作る 11
  • 12. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. Markdownで仕様を書ける! 🎊 12 Markdownで書けると捗りますよね、Documentation As Code 🙌
  • 13. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 3-2. StoryBook に Markdown で仕様を書ける! 13
  • 14. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 👉 使用例をコピーできる 3-2. StoryBook に Markdown で仕様を書ける! 14
  • 15. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 👉 コンポーネントの属性の一覧を生成してくれる 3-2. StoryBook に Markdown で仕様を書ける! 15
  • 16. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 3-2. StoryBook に Markdown で仕様を書ける! 16 👉 Markdown で仕様が書ける
  • 17. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 3-2. StoryBook に Markdown で仕様を書ける! 17 👉 Markdown で仕様が書ける
  • 18. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 3-2. StoryBook に Markdown で仕様を書ける! 18 👉 nuxt.config.js に追記が必要!
  • 19. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. Fetch APIのモックを書ける! 🎊 19 APIが無くても開発進められる!
  • 20. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 3-5. StoryBook に API のモックを書ける! 20 👉 下記のモックを書くと・・・
  • 21. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 3-5. StoryBook に API のモックを書ける! 21 👉 FetchAPI(axios)の結果をモックに差し替えられます
  • 22. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. モックのインストールが必要で す 22 今回は storybook-addon-mock を使います
  • 23. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. Step1. npm インストール 23 Nuxt.js ならすぐに使い始められます!
  • 24. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. Step2. nuxt.config.js に追記 24 Nuxt.js ならすぐに使い始められます!
  • 25. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 4. 得られるメリット 👉 1. ドキュメント作成と並行して開発が進められる ➡ その後の開発が楽に! 👉 2. 仕様が実際の画面で気軽に確認できる ➡ 実際の動きが誰でも(他の開発者、利用者など) 想像しやすい! 👉 3. バックエンドが無くても開発が進められる(無いこと前提に進める) ➡ スケジュール調整が楽になる! 25
  • 26. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 全体の開発工数を抑えられる 🎊 26 設計工数↑開発工数↓↓ (実際の動きが想像しやすいので、仕様ミスが減る) (バックエンドの進捗を気にせずに、コーディングが進められる)
  • 27. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 仕様の確認も楽に 🎊 27 1. 〜画面で検索して〜エラーになったら、どうなったっけ?的な疑問も 2. 再利用する既存のコンポーネントを試しに動かしたい
  • 28. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. これらが全てコードに、 🎊 28 スプレッドシートの管理が避けられる
  • 29. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. まとめ StoryBook駆動で新規システムの開発をやってみました。 今のところ、よく言われるStoryBookの陳腐化的なデメリットは感じて無いです。 (スプレッドシートよりは良い感じ、 Vue+StoryBookの情報が少なくてたまに詰まるのが困る。 JSX使いたい。) 全体の開発工数を下げつつ、コンポーネントの管理も楽になるので、 よろしければ、お試しください😉 (最後のスライド以降に、利用したソースコードを記載) 29
  • 30. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. ご静聴、ありがとうございました 30
  • 31. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. Appendix 31
  • 32. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 32 <!-- components/molcules/TextboxLabel.vue --> <template> <div class="tw-relative tw-mb-4"> <label :for="id" class="tw-leading-7 tw-text-sm tw-text-gray-600"> <slot></slot> </label> <atoms-html-textbox class="textbox" :id="id" :value="value" :type="type" :placeholder="placeholder" :disabled="disabled" @input="emitEvent($event, 'input')" @search="emitEvent($event, 'search')" @enter="emitEvent($event, 'enter')" > </atoms-html-textbox> </div> </template> <script> export default { props: { id: { type: String, required: false, default: '' }, type: { type: String, required: false, default: 'text' }, value: { type: String, required: false, default: '' }, placeholder: { type: String, required: false, default: '' }, disabled: { type: Boolean, required: false, default: false }, }, methods: { emitEvent(eventValue, eventName) { this.$emit(eventName, eventValue) }, }, } </script>
  • 33. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 33 // components/molcules/TextboxLabel.stories.js export default { title: 'molcules/TextboxLabelMdx', } export const Basic = ({}) => ({ template: '<molcules-textbox-label :type="type" :value="value">Basic</molcules-textbox-label>', props: { type: { default: 'text', }, value: { default: 'Basic', }, }, }) Basic.argTypes = { type: { control: { type: 'select', options: ['text', 'search', 'password'], }, defaultValue: 'text', }, value: { control: 'text', defaultValue: '', }, }
  • 34. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 34 <!-- components/molcules/TextboxLabel.stories.mdx --> import { Meta, Story, Props } from '@storybook/addon-docs/blocks' import { action } from '@storybook/addon-actions' import MolculesTextboxLabel from './TextboxLabel' <Meta title="molcules/TextboxLabelMdx" component={MolculesTextboxLabel} /> # This is an awesome button Some **markdown** description, or whatever you want. ## Example サンプル <Story name="Basic" args={{ type: 'text', value: 'Basic' }}> {{ template: '<molcules-textbox-label :type="type" :value="value">Basic</molcules-textbox-label>', props: { type: { default: 'text', }, value: { default: 'Basic', }, }, }} </Story> ```html <molcules-textbox-label :type="text" :value="Basic" /> ``` ## Props <Props of={MolculesTextboxLabel} />
  • 35. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 35 <!-- components/atoms/html/Textbox.vue --> <template> <input :id="id" ref="textbox" :value="value" :type="type" :placeholder="placeholder" :disabled="disabled" :required="required" @input="$emit('input', $event.target.value)" @search="$emit('search', $event.target.value)" @keydown.enter="$emit('enter', $event.target.value)" /> </template> <script> export default { props: { id: { type: String, required: false, default: '' }, type: { type: String, required: false, default: 'text' }, value: { type: String, required: false, default: '' }, placeholder: { type: String, required: false, default: '' }, disabled: { type: Boolean, required: false, default: false }, required: { type: Boolean, required: false, default: false }, }, } </script>
  • 36. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 36 <!-- components/molcules/el/RadioGroupRadioListLabel.vue --> <template> <atoms-el-col :span="span"> <div class="tw-text-xs tw-text-gray-600"><slot></slot></div> <atoms-el-radio-group ref="atoms-el-radio-group" :value="value" :disabled="disabled" @input="input" @change="change" > <atoms-el-radio v-if="isVisibleAll" :label="$constants.SELECT_NUMBER_ALL_VALUE" >全て</atoms-el-radio > <atoms-el-radio v-for="option in options" :key="option.key" :label="option.key" >{{ option.label }}</atoms-el-radio > </atoms-el-radio-group> </atoms-el-col> </template> <script> export default { props: { isVisibleAll: { type: Boolean, required: false, default: true }, value: { type: [String, Number, Boolean], required: false, default: undefined, }, disabled: { type: Boolean, required: false, default: false }, span: { type: Number, required: false, default: null }, options: { type: [Array, Object], required: false, default: () => { return [] }, }, }, methods: { input(value) { this.$emit('input', value) }, change(value) { this.$emit('change', value) }, }, } </script>
  • 37. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 37 // components/molcules/el/RadioGroupRadioListLabel.stories.js import RadioGroupRadioListLabel from './RadioGroupRadioListLabel' export default { title: 'molcules/el/RadioGroupRadioListLabel', component: RadioGroupRadioListLabel, argTypes: {}, } // eslint-disable-next-line no-empty-pattern export const Basic = (_args, { argTypes }) => ({ components: { RadioGroupRadioListLabel }, props: Object.keys(argTypes), template: '<molcules-el-radio-group-radio-list-label v-bind="$props">Basic</molcules-el-radio-group-radio-list-label>', }) Basic.args = { options: [ { key: 777, label: 'メイドちゃん1' }, { key: 888, label: 'メイドちゃん2' }, ], value: -1, } export const NotAll = (_args, { argTypes }) => ({ components: { RadioGroupRadioListLabel }, props: Object.keys(argTypes), template: '<molcules-el-radio-group-radio-list-label v-bind="$props">NotAll</molcules-el-radio-group-radio-list-label>', }) NotAll.args = { options: [ { key: 777, label: 'メイドちゃん1' }, { key: 888, label: 'メイドちゃん2' }, ], value: 8, isVisibleAll: false, }
  • 38. Copyright  (C) 2021 Toranoana Inc. All Rights Reserved. 38 // components/molcules/el/RadioGroupRadioListLabel.stories.mdx import { Meta, Story, Props, Canvas } from '@storybook/addon-docs/blocks' import { action } from '@storybook/addon-actions' import RadioGroupRadioListLabel from './RadioGroupRadioListLabel' <Meta title="molcules/el/RadioGroupRadioListLabel/Mdx" component={RadioGroupRadioListLabel} /> # 概要 ElementUI のラジオボタン+テキストラベル、el-col を組み合わせた、Molcule コンポーネントです。 ## サンプル ### 表示 export const Template = (args, { argTypes }) => ({ props: Object.keys(argTypes), components: { RadioGroupRadioListLabel }, template: '<molcules-el-radio-group-radio-list-label v-bind="$props">NotAll</molcules-el-radio-group-radio-list-label>', viewMode: 'docs', }) <Canvas> <Story name="Basic" args={{ options: [ { key: 777, label: 'メイドちゃん1' }, { key: 888, label: 'メイドちゃん2' }, ], value: -1, }} > {Template.bind({})} </Story> </Canvas> ### コード ```html <molcules-el-radio-group-radio-list-label v-model="プロパティの名前" :span="8" :options="[ { key: 7, label: 'メイドちゃん1' }, { key: 8, label: 'メイドちゃん2' }, ]" > NotAll </molcules-el-radio-group-radio-list-label> ``` ## 補足 - span は ElementUI の el-col タグの span 値になります。 - デフォルトのスロットは、ラベル名になります。 ## 属性 <Props of={RadioGroupRadioListLabel} />