Remove @storybook

This commit is contained in:
Jean-Baptiste Bellet
2022-12-07 16:38:07 +01:00
parent c96bba8094
commit 928b4144d5
14 changed files with 101 additions and 3585 deletions

1
.gitignore vendored
View File

@@ -50,7 +50,6 @@ vendor/bundle/
coverage
/reports/
!/reports/README.md
/spec/components/stories/**/*.stories.json
/public/packs
/public/packs-test

View File

@@ -12,7 +12,6 @@
babel.config.js
postcss.config.js
.storybook/
/app/assets/
/config/
/coverage/

View File

@@ -1,7 +0,0 @@
module.exports = {
stories: ['../spec/components/stories/**/*.stories.json'],
addons: [
'@storybook/addon-docs',
'@storybook/addon-controls',
],
};

View File

@@ -1,2 +0,0 @@
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" media="screen" href="http://localhost:3000/assets/darkswarm/all.css" />

View File

@@ -1,5 +0,0 @@
export const parameters = {
server: {
url: `http://localhost:3000/rails/stories`,
},
};

View File

@@ -185,7 +185,6 @@ group :development do
gem 'spring-commands-rspec'
gem 'web-console'
gem "view_component_storybook"
gem 'rack-mini-profiler', '< 3.0.0'
end

View File

@@ -718,8 +718,6 @@ GEM
rails (>= 5.2, < 8.0)
stimulus_reflex (>= 3.5.0.pre2)
view_component (>= 2.28.0)
view_component_storybook (0.11.1)
view_component (>= 2.36)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
@@ -884,7 +882,6 @@ DEPENDENCIES
vcr
view_component
view_component_reflex (= 3.1.14.pre9)
view_component_storybook
web!
web-console
webmock

View File

@@ -32,8 +32,6 @@ if defined?(Bundler)
# Bundler.require(:default, :assets, Rails.env)
end
require "view_component/storybook" if Rails.env.development?
module Openfoodnetwork
class Application < Rails::Application
config.middleware.insert_before(

View File

@@ -78,6 +78,4 @@ Openfoodnetwork::Application.configure do
config.action_mailer.asset_host = "http://localhost:3000"
config.log_level = ENV.fetch("DEV_LOG_LEVEL", :debug)
config.view_component_storybook.stories_path = Rails.root.join("spec/components/stories")
end

View File

@@ -1,15 +0,0 @@
# Adjust headers to allow running Storybook in development.
# Uses iframes and doesn't play nicely with CORS checks
if Rails.env.development?
module PermissiveCORSHeaders
def self.before(response)
response.headers["Access-Control-Allow-Origin"] = "*"
response.headers["Access-Control-Allow-Methods"] = "GET"
end
end
Rails.application.reloader.to_prepare do
ViewComponent::Storybook::StoriesController.before_action(PermissiveCORSHeaders)
end
end

View File

@@ -7,7 +7,6 @@
},
"license": "AGPL-3.0",
"scripts": {
"storybook": "start-storybook",
"prepare": "husky install",
"pretty-quick": "pretty-quick"
},
@@ -43,9 +42,6 @@
"webpack-cli": "~3"
},
"devDependencies": {
"@storybook/addon-controls": "^6.4.13",
"@storybook/addon-docs": "^6.4.13",
"@storybook/server": "^6.4.13",
"husky": "^8.0.0",
"jasmine-core": "~2.4.1",
"jest": "^27.4.7",

View File

@@ -1,9 +0,0 @@
# frozen_string_literal: true
class DistributorTitleComponentStories < ViewComponent::Storybook::Stories
story(:default) do
controls do
text(:name, "Freddy s Farm Shop")
end
end
end

View File

@@ -1,15 +0,0 @@
# frozen_string_literal: true
class ExampleComponentStories < ViewComponent::Storybook::Stories
story(:with_short_text) do
controls do
text(:title, 'OK')
end
end
story(:with_long_text) do
controls do
text(:title, 'This is a long text')
end
end
end

3619
yarn.lock

File diff suppressed because it is too large Load Diff