Skip to content

Instantly share code, notes, and snippets.

@czj
Created January 16, 2021 10:48
Show Gist options
  • Save czj/558e4051a4be709da4e3405cd17461c3 to your computer and use it in GitHub Desktop.
Save czj/558e4051a4be709da4e3405cd17461c3 to your computer and use it in GitHub Desktop.
Related Files Plugin rules for view_component gem files in a Rails app
// https://github.com/fabiokr/sublime-related-files
{
"patterns": {
// Components Ruby classes
".+\/app\/components\/(.+).rb":
[
"app/components/$1.html.slim",
"app/components/$1.rb",
"app/components/$1.scss",
"app/components/$1_controller.js",
"test/components/$1_test.rb",
"test/components/previews/$1_preview.rb"
],
// Components templates
".+\/app\/components\/(.+).html.slim":
[
"app/components/$1.rb",
"app/components/$1.scss",
"app/components/$1_controller.js",
"test/components/$1_test.rb",
"test/components/previews/$1_preview.rb"
],
// Components JavaScript
".+\/app\/components\/(.+)_controller.js":
[
"app/components/$1.html.slim",
"app/components/$1.scss",
"app/components/$1.rb",
"test/components/$1_test.rb",
"test/components/previews/$1_preview.rb"
],
// Components JavaScript
".+\/app\/components\/(.+).scss":
[
"app/components/$1.html.slim",
"app/components/$1.rb",
"app/components/$1_controller.js",
"test/components/$1_test.rb",
"test/components/previews/$1_preview.rb"
],
// Components previews
".+\/test\/components\/previews\/(.+)_preview.rb":
[
"app/components/$1.html.slim",
"app/components/$1.rb",
"app/components/$1.scss",
"app/components/$1_controller.js",
"test/components/$1_test.rb"
],
// Components previews
".+\/test\/components\/(.+)_test.rb":
[
"app/components/$1.html.slim",
"app/components/$1.rb",
"app/components/$1.scss",
"app/components/$1_controller.js",
"test/components/previews/$1_preview.rb"
],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment