spec/integration/assets/assets_spec.rb in hanami-2.1.0.beta2.1 vs spec/integration/assets/assets_spec.rb in hanami-2.1.0.rc1

- old
+ new

@@ -16,10 +16,23 @@ config.logger.stream = StringIO.new end end RUBY + write "config/assets.mjs", <<~JS + import * as assets from "hanami-assets"; + await assets.run(); + JS + + write "package.json", <<~JSON + { + "scripts": { + "assets": "node config/assets.mjs" + } + } + JSON + write "config/routes.rb", <<~RUBY module TestApp class Routes < Hanami::Routes get "posts/:id/edit", to: "posts.edit" put "posts/:id", to: "posts.update" @@ -60,13 +73,11 @@ end end RUBY write "app/templates/posts/show.html.erb", <<~ERB - <%= stylesheet_link_tag("app") %> - <%= css("app") %> + <%= stylesheet_tag("app") %> <%= javascript_tag("app") %> - <%= js("app") %> ERB write "app/assets/js/app.ts", <<~TS import "../css/app.css";