Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo committed Jul 16, 2024
1 parent f0776b9 commit 91065a5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PATH
PATH
remote: vite_ruby
specs:
vite_ruby (3.6.1)
vite_ruby (3.6.2)
dry-cli (>= 0.7, < 2)
rack-proxy (~> 0.6, >= 0.6.1)
zeitwerk (~> 2.2)
Expand Down
10 changes: 10 additions & 0 deletions test/file_utils_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ def teardown
FileUtils.remove_entry_secure(root)
end

def test_fresh_installation
app_root = root.join('test_fresh_install').tap(&:mkpath)
Dir.chdir(app_root) {
`bundle exec vite install`
}
assert_path_exists app_root.join('vite.config.ts')
assert_path_exists app_root.join('package.json')
assert 'module', JSON.parse(app_root.join('package.json').read)['type']
end

def test_write
path = root.join('write')
write(path, "Hello\nWorld")
Expand Down
4 changes: 4 additions & 0 deletions vite_ruby/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [3.6.2](https://github.com/ElMassimo/vite_ruby/compare/[email protected][email protected]) (2024-07-16)



## [3.6.1](https://github.com/ElMassimo/vite_ruby/compare/[email protected][email protected]) (2024-07-16)


Expand Down
2 changes: 1 addition & 1 deletion vite_ruby/lib/vite_ruby/cli/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def create_configuration_files
def install_js_dependencies
package_json = root.join('package.json')
unless package_json.exist?
write(package.json, <<~JSON)
write package_json, <<~JSON
{
"private": true,
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion vite_ruby/lib/vite_ruby/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class ViteRuby
VERSION = '3.6.1'
VERSION = '3.6.2'

# Internal: Versions used by default when running `vite install`.
DEFAULT_VITE_VERSION = '^5.0.0'
Expand Down

0 comments on commit 91065a5

Please sign in to comment.