Skip to content

Commit

Permalink
Set up nuxt-storybook and create first story
Browse files Browse the repository at this point in the history
- Install @nuxt/nuxt-storybook
  https://storybook.nuxtjs.org/

- Refactored Image component
  Create storybook story for Image Component

- Install and configure @nuxt/typescript-runtime

[Ticket: FE-04]
  • Loading branch information
ryanmstokes committed Apr 14, 2021
1 parent 3771cff commit c45b6dc
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ sw.*
*.swp
.nuxt-storybook
storybook-static
.env
23 changes: 0 additions & 23 deletions components/Logo.vue

This file was deleted.

9 changes: 9 additions & 0 deletions components/logo/Logo.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Logo from '@/components/logo/Logo.vue';

export default {
title: 'Branding',
component: Logo
};

export const logo = () => '<Logo />'

8 changes: 8 additions & 0 deletions components/logo/Logo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<section class="logo">
<img src="~/assets/logo.svg" width="250" height="250">
</section>
</template>
<style src="./style.css"></style>


3 changes: 3 additions & 0 deletions components/logo/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.logo {
@apply justify-center bg-gray-200 inline-block;
}
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "beast-of-the-east-campers",
"name": "landing-zone",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"dev": "nuxt-ts",
"build": "nuxt-ts build",
"start": "nuxt-ts start",
"generate": "nuxt-ts generate",
"test": "jest"
},
"dependencies": {
"core-js": "^3.9.1",
"@nuxt/typescript-runtime": "^2.1.0",
"core-js": "^3",
"nuxt": "^2.15.3"
},
"devDependencies": {
Expand All @@ -23,6 +24,7 @@
"babel-jest": "^26.6.3",
"jest": "^26.6.3",
"postcss": "^8.2.9",
"prettier": "^2.2.1",
"ts-jest": "^26.5.4",
"ts-node": "^9.1.1",
"vue-jest": "^3.0.4"
Expand Down
7 changes: 2 additions & 5 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="content">
<div class="inner">
<Logo class="logo" />
<Logo />
<h1 class="title">
Landing Zone
</h1>
Expand All @@ -24,7 +24,7 @@

<script lang="ts">
import Vue from 'vue'
var blah;
export default Vue.extend({})
</script>

Expand All @@ -37,9 +37,6 @@ export default Vue.extend({})
@apply m-auto text-center;
}
.logo{
@apply bg-gray-200 inline-block;
}
.title {
@apply text-5xl font-sans block text-gray-400 leading-5 mt-10;
}
Expand Down
45 changes: 40 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,14 @@
ts-loader "^8.0.17"
typescript "~4.2"

"@nuxt/typescript-runtime@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@nuxt/typescript-runtime/-/typescript-runtime-2.1.0.tgz#8838bc929519f44ac40d8d2331aeb095a05965a5"
integrity sha512-quzxXiWq+jGdnCedDIYuBiExrfIJL3VL9o4gJyq6QzthKLYSvLzB6w4RiH6UbLtnNJyDoO9ywyNSI2+RUJr/Ng==
dependencies:
ts-node "^9.1.1"
typescript "~4.2"

"@nuxt/[email protected]":
version "2.15.4"
resolved "https://registry.yarnpkg.com/@nuxt/utils/-/utils-2.15.4.tgz#1c84dfa964357224a79d402797c9feab2040991c"
Expand Down Expand Up @@ -3611,6 +3619,11 @@ are-we-there-yet@~1.1.2:
delegates "^1.0.0"
readable-stream "^2.0.6"

arg@^4.1.0:
version "4.1.3"
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==

arg@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.0.tgz#a20e2bb5710e82950a516b3f933fee5ed478be90"
Expand Down Expand Up @@ -5128,7 +5141,7 @@ core-js@^2.4.0, core-js@^2.6.5:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==

core-js@^3.0.4, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.9.1:
core-js@^3, core-js@^3.0.4, core-js@^3.6.5, core-js@^3.8.2:
version "3.10.0"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.10.0.tgz#9a020547c8b6879f929306949e31496bbe2ae9b3"
integrity sha512-MQx/7TLgmmDVamSyfE+O+5BHvG1aUGj/gHhLn1wVtm2B5u1eVIPvh7vkfjwWKNCjrTJB8+He99IntSQ1qP+vYQ==
Expand Down Expand Up @@ -5241,7 +5254,7 @@ [email protected]:
gud "^1.0.0"
warning "^4.0.3"

create-require@^1.1.1:
create-require@^1.1.0, create-require@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
Expand Down Expand Up @@ -5803,6 +5816,11 @@ diff-sequences@^26.6.2:
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1"
integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==

diff@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==

diffie-hellman@^5.0.0:
version "5.0.3"
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
Expand Down Expand Up @@ -9239,7 +9257,7 @@ make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0, make-dir@~3.1.0:
dependencies:
semver "^6.0.0"

[email protected]:
[email protected], make-error@^1.1.1:
version "1.3.6"
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
Expand Down Expand Up @@ -11333,7 +11351,7 @@ prettier@^1.18.2:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==

prettier@~2.2.1:
prettier@^2.2.1, prettier@~2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
Expand Down Expand Up @@ -12832,7 +12850,7 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2:
source-map-url "^0.4.0"
urix "^0.1.0"

source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19:
source-map-support@^0.5.16, source-map-support@^0.5.17, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19:
version "0.5.19"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
Expand Down Expand Up @@ -13696,6 +13714,18 @@ ts-map@^1.0.3:
resolved "https://registry.yarnpkg.com/ts-map/-/ts-map-1.0.3.tgz#1c4d218dec813d2103b7e04e4bcf348e1471c1ff"
integrity sha512-vDWbsl26LIcPGmDpoVzjEP6+hvHZkBkLW7JpvwbCv/5IYPJlsbzCVXY3wsCeAxAUeTclNOUZxnLdGh3VBD/J6w==

ts-node@^9.1.1:
version "9.1.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==
dependencies:
arg "^4.1.0"
create-require "^1.1.0"
diff "^4.0.1"
make-error "^1.1.1"
source-map-support "^0.5.17"
yn "3.1.1"

ts-pnp@^1.1.6:
version "1.2.0"
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
Expand Down Expand Up @@ -14764,6 +14794,11 @@ ylru@^1.2.0:
resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.2.1.tgz#f576b63341547989c1de7ba288760923b27fe84f"
integrity sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==

[email protected]:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==

yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
Expand Down

0 comments on commit c45b6dc

Please sign in to comment.