Skip to content

Instantly share code, notes, and snippets.

@czj
Created January 16, 2021 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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