Skip to content
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
26 changes: 18 additions & 8 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const config: KnipConfig = {
ignoreBinaries: [
// Has to be installed globally
'yalc',
// Used in package.json scripts (devDependency, so unlisted in production mode)
'nps',
// Pro package binaries used in Pro workflows
'playwright',
'e2e-test',
Expand Down Expand Up @@ -112,6 +110,12 @@ const config: KnipConfig = {
'**/app-react16/**/*',
// Playwright support files and helpers - generated by cypress-on-rails gem
'e2e/playwright/support/**',
// Components and files used dynamically by React on Rails (registered at runtime)
'client/app/actions/**',
'client/app/components/**',
'client/app/routes/**',
'client/app/startup/**',
'client/app/store/**',
],
project: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}!', 'config/webpack/*.js'],
paths: {
Expand All @@ -124,9 +128,6 @@ const config: KnipConfig = {
'bin/.*',
],
ignoreDependencies: [
// Build-time dependencies not detected by Knip in any mode
'@babel/runtime',
'mini-css-extract-plugin',
// There's no ReScript plugin for Knip
'@rescript/react',
// The Babel plugin fails to detect it
Expand All @@ -136,18 +137,27 @@ const config: KnipConfig = {
'node-libs-browser',
// The below dependencies are not detected by the Webpack plugin
// due to the config issue.
'css-loader',
'expose-loader',
'file-loader',
'imports-loader',
'null-loader',
'sass',
'sass-loader',
'sass-resources-loader',
'style-loader',
'url-loader',
// Transitive dependency of shakapacker but listed as direct dependency
'webpack-merge',
// Dependencies not detected in production mode
'@babel/runtime',
'mini-css-extract-plugin',
'css-loader',
'sass',
'sass-loader',
// Dependencies used dynamically by React on Rails
'create-react-class',
'react-helmet',
'@types/react-helmet',
'react-redux',
'react-router-dom',
],
},
},
Expand Down
12 changes: 4 additions & 8 deletions react_on_rails_pro/spec/dummy/bin/dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env ruby
# frozen_string_literal: true

if ! command -v foreman &> /dev/null
then
echo "Installing foreman..."
gem install foreman
fi

foreman start -f Procfile.dev
# This script calls the base dev script with a fixed route for the dummy app
exec File.join(__dir__, "../../../../lib/generators/react_on_rails/templates/base/base/bin/dev"), "--route=/", *ARGV
1 change: 0 additions & 1 deletion spec/dummy/bin/dev

This file was deleted.

5 changes: 5 additions & 0 deletions spec/dummy/bin/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

# This script calls the base dev script with a fixed route for the dummy app
exec File.join(__dir__, "../../../lib/generators/react_on_rails/templates/base/base/bin/dev"), "--route=/", *ARGV
Loading