Initial commit
This commit is contained in:
commit
aa20cf0f0b
98 changed files with 9480 additions and 0 deletions
13
app/javascript/packs/application.js
Normal file
13
app/javascript/packs/application.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
// This file is automatically compiled by Webpack, along with any other files
|
||||
// present in this directory. You're encouraged to place your actual application logic in
|
||||
// a relevant structure within app/javascript and only use these pack files to reference
|
||||
// that code so it'll be compiled.
|
||||
|
||||
import Rails from "@rails/ujs"
|
||||
import Turbolinks from "turbolinks"
|
||||
import * as ActiveStorage from "@rails/activestorage"
|
||||
import "channels"
|
||||
|
||||
Rails.start()
|
||||
Turbolinks.start()
|
||||
ActiveStorage.start()
|
20
app/javascript/packs/hello_svelte.js
Normal file
20
app/javascript/packs/hello_svelte.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* eslint no-console: 0 */
|
||||
// Run this example by adding <%= javascript_pack_tag 'hello_svelte' %> (and
|
||||
// <%= stylesheet_pack_tag 'hello_svelte' %> if you have styles in your component)
|
||||
// to the head of your layout file,
|
||||
// like app/views/layouts/application.html.erb.
|
||||
// All it does is render <div>Hello Svelte!</div> at the bottom of the page.
|
||||
|
||||
import App from '../app.svelte'
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const app = new App({
|
||||
target: document.body,
|
||||
props: {
|
||||
name: 'Svelte'
|
||||
}
|
||||
});
|
||||
|
||||
window.app = app;
|
||||
})
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue