Skip to content

Commit

Permalink
[wip]
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Jul 8, 2022
1 parent a952c7d commit a8bc9be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
8 changes: 2 additions & 6 deletions app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ import Rails from "@rails/ujs"
import Turbolinks from "turbolinks"
import * as ActiveStorage from "@rails/activestorage"
import "channels"
import { isOrcid } from './orcid'

window.isOrcid = isOrcid

$(document).on('turbolinks:load', () => {
console.log('trace1')
console.log(window.isOrcid)

console.log('loaded')
console.log(window)
})

Rails.start()
Expand Down
3 changes: 2 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
</div>
<%= render partial: 'shared/footer' %>
</body>
<%= javascript_pack_tag 'application' %>
<%= javascript_pack_tag 'orcid', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<% end %>
1 change: 1 addition & 0 deletions app/views/works/_edit_javascript.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script>

console.log( window );
$(function() {
var incrementCounter = function(elementId) {
Expand Down
2 changes: 1 addition & 1 deletion config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default: &default
source_path: app/javascript
source_entry_path: packs
public_root_path: public
public_output_path: packs
public_output_path: describe/packs
cache_path: tmp/cache/webpacker
webpack_compile_output: true

Expand Down

0 comments on commit a8bc9be

Please sign in to comment.