Skip to content

Commit

Permalink
fix: minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Aug 10, 2023
1 parent 3059ef9 commit 06de10f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions variants/frontend-react-typescript/template.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
source_paths.unshift(File.dirname(__FILE__))

installed_jest_major_version = JSON.parse(File.read("node_modules/jest/package.json")).fetch("version").split(".").first

run "yarn remove prop-types"
yarn_add_dependencies %w[@types/react @types/react-dom]
yarn_add_dev_dependencies [
"@jest/types@#{installed_jest_major_version}",
"ts-jest@#{installed_jest_major_version}",
"ts-node"
]
run "yarn install"

rename_js_file_to_ts "app/frontend/packs/server_rendering"

Expand Down Expand Up @@ -49,5 +41,5 @@
TYPES
end

remove_dir "app/frontend/test"
directory "app/frontend/test"
remove_dir "app/frontend/test/components"
directory "app/frontend/test/components"
2 changes: 1 addition & 1 deletion variants/frontend-react/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config = {
env: { commonjs: true, node: true, browser: true },
extends: ['ackama', 'ackama/react'],
ignorePatterns: ['tmp/'],
parserOptions: { sourceType: 'module' },
parserOptions: { sourceType: 'module', ecmaVersion: 2022 },
overrides: [
{
files: [
Expand Down
2 changes: 1 addition & 1 deletion variants/frontend-stimulus-typescript/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
remove_file "jest.config.js", force: true
copy_file "jest.config.ts"

copy_file "babel.config.js"
copy_file "babel.config.js", force: true

package_json = JSON.parse(File.read("./package.json"))

Expand Down

0 comments on commit 06de10f

Please sign in to comment.