Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move lookbook previews from the lookbook folder to the main project #1216

Merged
merged 3 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/stupid-ties-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Move lookbook previews from the lookbook folder to the main project
2 changes: 1 addition & 1 deletion component_generator.thor
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ComponentGenerator < Thor::Group
end

def create_preview
template("templates/preview.tt", "lookbook/test/components/previews/#{status_path}#{underscore_name}_preview.rb")
template("templates/preview.tt", "test/components/previews/#{status_path}#{underscore_name}_preview.rb")
end

def add_to_docs_rakefile
Expand Down
2 changes: 2 additions & 0 deletions lookbook/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
# Suppress logger output for asset requests.
config.assets.quiet = true

config.view_component.preview_paths << Rails.root.join("../test/components/previews")

# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true

Expand Down
2 changes: 2 additions & 0 deletions lookbook/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@

# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false

config.view_component.preview_paths << Rails.root.join("../test/components/previews")
end
62 changes: 0 additions & 62 deletions lookbook/config/environments/test.rb

This file was deleted.

7 changes: 0 additions & 7 deletions lookbook/test/application_system_test_case.rb

This file was deleted.

17 changes: 0 additions & 17 deletions lookbook/test/test_helper.rb

This file was deleted.