diff --git a/Gemfile b/Gemfile index 8c98802..631bde8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,9 @@ +ruby '~>2.7.7' source 'https://rubygems.org' gem 'roda', '2.14.0' gem 'roda-sprocket_assets', '0.0.9' -gem 'thin', '1.6.4' +gem 'thin' gem 'rack-unreloader', '1.5.0' gem 'rack-livereload' gem 'rspec' diff --git a/Makefile b/Makefile index 117e465..2cd7479 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ server: - bundle exec rake webpack:run& bundle exec thin start --port=3001 + bundle exec rake opal-connect:webpack:run & bundle exec thin start --port=3011 run: bundle exec thin start --port=3001 diff --git a/Rakefile b/Rakefile index 53f4a7e..25515ad 100644 --- a/Rakefile +++ b/Rakefile @@ -6,7 +6,7 @@ require './app/config/boot' require 'opal-connect' require 'opal/connect/rake_task' -Opal::Connect::RakeTask.new('webpack') +Opal::Connect::RakeTask.new require 'opal/rspec/rake_task' Opal::RSpec::RakeTask.new('opal:rspec') do |s| diff --git a/gemfiles/opal-connect-0.0.23.gem b/gemfiles/opal-connect-0.0.23.gem new file mode 100644 index 0000000..5269b00 Binary files /dev/null and b/gemfiles/opal-connect-0.0.23.gem differ diff --git a/lib/opal/connect/rake_task.rb b/lib/opal/connect/rake_task.rb index b28ad37..5ea52d4 100644 --- a/lib/opal/connect/rake_task.rb +++ b/lib/opal/connect/rake_task.rb @@ -3,18 +3,18 @@ module Connect class RakeTask include Rake::DSL if defined? Rake::DSL - def initialize(name = 'webpack', opts = {}) + def initialize(name = 'opal-connect:webpack', opts = {}) namespace name do - desc "Start webpack" + desc "Runs package.json script watchOpalConnectWebpack transpiling ruby content to js and watch changes" task :run do envs = initialize_connect - exec(envs, 'webpack --progress --watch') + exec(envs, 'npm run watchOpalConnectWebpack') end - desc "Build webpack" + desc "Runs package.json script buildOpalConnectWebpack transpiling ruby script to js" task :build do envs = initialize_connect - exec(envs, 'webpack --progress') + exec(envs, 'npm run buildOpalConnectWebpack') end end diff --git a/lib/opal/connect/version.rb b/lib/opal/connect/version.rb index e8a2355..63ef716 100644 --- a/lib/opal/connect/version.rb +++ b/lib/opal/connect/version.rb @@ -1,5 +1,5 @@ module Opal module Connect - VERSION = "0.0.22" + VERSION = "0.0.23" end end