Przeglądaj źródła

Remove storybook from recipes project

Tatiana Inama 6 lat temu
rodzic
commit
e55784f2cd

+ 14 - 0
package-lock.json

@@ -0,0 +1,14 @@
+{
+  "name": "ktchn",
+  "version": "1.0.0",
+  "lockfileVersion": 1,
+  "requires": true,
+  "dependencies": {
+    "@types/webpack-env": {
+      "version": "1.15.2",
+      "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.15.2.tgz",
+      "integrity": "sha512-67ZgZpAlhIICIdfQrB5fnDvaKFcDxpKibxznfYRVAT4mQE41Dido/3Ty+E3xGBmTogc5+0Qb8tWhna+5B8z1iQ==",
+      "dev": true
+    }
+  }
+}

+ 1 - 0
package.json

@@ -36,6 +36,7 @@
   },
   "devDependencies": {
     "@types/ramda": "github:types/npm-ramda#dist",
+    "@types/webpack-env": "^1.15.2",
     "redux-devtools-extension": "^2.13.8"
   }
 }

+ 0 - 2
recipes/.storybook/addons.js

@@ -1,2 +0,0 @@
-import '@storybook/addon-actions/register';
-import '@storybook/addon-links/register';

+ 0 - 9
recipes/.storybook/config.js

@@ -1,9 +0,0 @@
-import { configure } from '@storybook/react';
-
-const req = require.context('../src/components', true, /stories\.js$/);
-
-function loadStories() {
-  req.keys().forEach(filename => req(filename));
-}
-
-configure(loadStories, module);

+ 0 - 3
recipes/.storybook/preview-head.html

@@ -1,3 +0,0 @@
-<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lekton">

+ 3 - 3
recipes/package-lock.json

@@ -4929,9 +4929,9 @@
       "integrity": "sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ=="
     },
     "@types/webpack-env": {
-      "version": "1.14.0",
-      "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.14.0.tgz",
-      "integrity": "sha512-Fv+0gYJzE/czLoRKq+gnXWr4yBpPM3tO3C8pDLFwqVKlMICQUq5OsxwwFZYDaVr7+L6mgNDp16iOcJHEz3J5RQ=="
+      "version": "1.15.2",
+      "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.15.2.tgz",
+      "integrity": "sha512-67ZgZpAlhIICIdfQrB5fnDvaKFcDxpKibxznfYRVAT4mQE41Dido/3Ty+E3xGBmTogc5+0Qb8tWhna+5B8z1iQ=="
     },
     "@webassemblyjs/ast": {
       "version": "1.7.11",

+ 2 - 1
recipes/package.json

@@ -71,6 +71,7 @@
     "@storybook/addon-links": "^5.1.9",
     "@storybook/addons": "^5.1.9",
     "@storybook/react": "^5.1.9",
-    "@types/react-redux": "^7.1.1"
+    "@types/react-redux": "^7.1.1",
+    "@types/webpack-env": "^1.15.2"
   }
 }

+ 0 - 0
recipes/src/components/Card/.stories.js


+ 0 - 309
recipes/src/components/Ingredient/Form/stories.js

@@ -1,309 +0,0 @@
-import React from 'react';
-import { storiesOf } from '@storybook/react';
-import { action } from '@storybook/addon-actions';
-import IngredientForm from './index';
-import { assocPath } from 'ramda';
-
-const tabs = [
-  'for the chicken',
-  'for the sauce',
-  'for the rice',
-  'for the extra steps',
-]
-
-class Form extends React.Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      components: [
-        {
-          "name": "",
-          "ingredients": []
-        },
-        {
-          "name": "For the Chicken:",
-          "ingredients": [
-            {
-              "name": "thin boneless skinless chicken breast",
-              "quantity": 1.5,
-              "unit": "pound",
-              "_original": "1-1/2 lb of Thin Boneless Skinless Chicken Breast",
-              "suggestions": []
-            },
-            {
-              "name": "olive oil",
-              "quantity": 2,
-              "unit": "tablespoon",
-              "_original": "2 Tbsp of Olive Oil",
-              "suggestions": []
-            },
-            {
-              "name": "juice of  lime",
-              "quantity": 1,
-              "unit": "",
-              "_original": "Juice of 1 Lime",
-              "suggestions": []
-            },
-            {
-              "name": "chili powder",
-              "quantity": 0.5,
-              "unit": "teaspoon",
-              "_original": "1/2 tsp of Chili Powder",
-              "suggestions": [
-                {
-                  "_id": "5cf1397d72cd194524435041",
-                  "name": "cocoa powder",
-                  "variants": [
-                    "cocoa"
-                  ],
-                  "equivalences": {
-                    "cup": 1,
-                    "gr": 118,
-                    "tbsp": 16,
-                    "tsp": 48
-                  },
-                  "referenceUnit": "cup",
-                  "prefferedUnit": "gr"
-                },
-                {
-                  "_id": "5cf1397d72cd19452443503c",
-                  "name": "icing sugar",
-                  "variants": [
-                    "confectioner sugar",
-                    "powdered sugar"
-                  ],
-                  "equivalences": {
-                    "cup": 1,
-                    "gr": 125,
-                    "oz": 0.27,
-                    "tbsp": 15,
-                    "tsp": 45,
-                    "lb": 0.27
-                  },
-                  "referenceUnit": "cup",
-                  "prefferedUnit": "gr"
-                }
-              ]
-            },
-            {
-              "name": "oregano",
-              "quantity": 0.5,
-              "unit": "teaspoon",
-              "_original": "1/2 tsp of Oregano",
-              "suggestions": []
-            },
-            {
-              "name": "cumin",
-              "quantity": 0.5,
-              "unit": "teaspoon",
-              "_original": "1/2 tsp of Cumin",
-              "suggestions": []
-            },
-            {
-              "name": "paprika",
-              "quantity": 0.5,
-              "unit": "teaspoon",
-              "_original": "1/2 tsp of Paprika",
-              "suggestions": []
-            },
-            {
-              "name": "granulated garlic",
-              "quantity": 0.5,
-              "unit": "teaspoon",
-              "_original": "1/2 tsp of Granulated Garlic",
-              "suggestions": [
-                {
-                  "_id": "5cf1397d72cd19452443503b",
-                  "name": "granulated sugar",
-                  "variants": [
-                    "sugar",
-                    "plain sugar"
-                  ],
-                  "equivalences": {
-                    "cup": 1,
-                    "gr": 200,
-                    "oz": 7.1,
-                    "tbsp": 14,
-                    "tsp": 42,
-                    "lb": 0.4
-                  },
-                  "referenceUnit": "cup",
-                  "prefferedUnit": "gr"
-                }
-              ]
-            },
-            {
-              "name": "salt, to taste",
-              "quantity": 0,
-              "unit": "",
-              "_original": "Salt, to taste",
-              "suggestions": []
-            }
-          ]
-        },
-        {
-          "name": "For the Dressing:",
-          "ingredients": [
-            {
-              "name": "plain greek yogurt",
-              "quantity": 0.5,
-              "unit": "cup",
-              "_original": "1/2 cup of Plain Greek Yogurt",
-              "suggestions": [
-                {
-                  "_id": "5cf1397d72cd194524435040",
-                  "name": "yogurt",
-                  "variants": [
-                    "plain yogurt"
-                  ],
-                  "equivalences": {
-                    "cup": 1,
-                    "gr": 245,
-                    "oz": 8.64,
-                    "tbsp": 16,
-                    "tsp": 48
-                  },
-                  "referenceUnit": "cup",
-                  "prefferedUnit": "gr"
-                },
-                {
-                  "_id": "5cf1397d72cd19452443503b",
-                  "name": "granulated sugar",
-                  "variants": [
-                    "sugar",
-                    "plain sugar"
-                  ],
-                  "equivalences": {
-                    "cup": 1,
-                    "gr": 200,
-                    "oz": 7.1,
-                    "tbsp": 14,
-                    "tsp": 42,
-                    "lb": 0.4
-                  },
-                  "referenceUnit": "cup",
-                  "prefferedUnit": "gr"
-                },
-                {
-                  "_id": "5cf1397d72cd194524435030",
-                  "name": "all purpose flour",
-                  "variants": [
-                    "plain flour",
-                    "all purpose flour",
-                    "regular flour",
-                    "flour"
-                  ],
-                  "equivalences": {
-                    "cup": 1,
-                    "gr": 125,
-                    "tbsp": 15.5,
-                    "tsp": 47
-                  },
-                  "referenceUnit": "cup",
-                  "prefferedUnit": "gr",
-                  "translation": {
-                    "dutch": "patentbloem"
-                  }
-                }
-              ]
-            },
-            {
-              "name": "fresh cilantro",
-              "quantity": 1,
-              "unit": "cup",
-              "_original": "1 cup of Fresh Cilantro",
-              "suggestions": []
-            },
-            {
-              "name": "scallions, roughly chopped",
-              "quantity": 2,
-              "unit": "",
-              "_original": "2 Scallions, roughly chopped",
-              "suggestions": []
-            },
-            {
-              "name": "juice of  lime or more, according to taste",
-              "quantity": 1,
-              "unit": "",
-              "_original": "Juice of 1 Lime or more, according to taste",
-              "suggestions": []
-            },
-            {
-              "name": "olive oil",
-              "quantity": 1,
-              "unit": "tablespoon",
-              "_original": "1 Tbsp of Olive Oil",
-              "suggestions": []
-            },
-            {
-              "name": "salt, to taste",
-              "quantity": 0,
-              "unit": "",
-              "_original": "Salt, to taste",
-              "suggestions": []
-            }
-          ]
-        },
-        {
-          "name": "For the rest of the salad:",
-          "ingredients": [
-            {
-              "name": "fresh lettuce of your choice",
-              "quantity": 0,
-              "unit": "",
-              "_original": "Fresh Lettuce of your choice",
-              "suggestions": []
-            },
-            {
-              "name": "bell peppers, halved and seeded",
-              "quantity": 2,
-              "unit": "",
-              "_original": "2 Bell Peppers, halved and seeded",
-              "suggestions": []
-            },
-            {
-              "name": "scallions or red onion, sliced",
-              "quantity": 0,
-              "unit": "",
-              "_original": "Scallions or REd Onion, sliced",
-              "suggestions": []
-            },
-            {
-              "name": "pico de gallo salsa",
-              "quantity": 0.5,
-              "unit": "cup",
-              "_original": "1/2 cup of Pico De Gallo Salsa",
-              "suggestions": []
-            },
-            {
-              "name": "avocado, sliced",
-              "quantity": 1,
-              "unit": "",
-              "_original": "1 Avocado, sliced",
-              "suggestions": []
-            }
-          ]
-        }
-      ]
-    }
-  }
-
-  updateField = (key) => {
-    return (e) => {
-      const newValue = e.currentTarget.value;
-      this.setState(assocPath(key, newValue, this.state.components))
-    }
-  }
-
-  render(){
-    return (
-      <IngredientForm
-        components={this.state.components}
-        updateField={this.updateField}
-      />
-    )
-  }
-}
-
-storiesOf('IngredientForm', module)
-  .add('Basic ingredients form', () => <Form/>)

+ 0 - 15
recipes/src/components/TabBar/stories.js

@@ -1,15 +0,0 @@
-import React from 'react';
-import { storiesOf } from '@storybook/react';
-import { action } from '@storybook/addon-actions';
-
-import TabBar from './index';
-
-const tabs = [
-  'for the chicken',
-  'for the sauce',
-  'for the rice',
-  'for the extra steps',
-]
-
-storiesOf('TabBar', module)
-  .add('To be implemented', () => <div></div>)

+ 1 - 3
recipes/tsconfig.json

@@ -20,9 +20,7 @@
     "jsx": "preserve"
   },
   "include": [
-    "src",
-    ".storybook/button.stories.js",
-    "src/components/Card/.stories.js"
+    "src"
   ],
   "extends": "./tsconfig.paths.json"
 }