index js bundle

This commit is contained in:
Jörn-Michael Miehe 2018-11-29 14:47:49 +01:00
parent f11d98e7e3
commit 84e487ee80
4 changed files with 22 additions and 17 deletions

21
src/index.coffee Normal file
View file

@ -0,0 +1,21 @@
# libs
window.$ = require('jquery')
# on load
$ ->
# libs requiring full DOM
io = require 'socket.io-client'
# style sheet
require './style/custom.scss'
# init Socket.IO
socket = io()
$('form[name="fftcg-login"]').submit ->
data =
uname: $('input[name="uname"]').val()
password: $('input[name="password"]').val()
@reset()
socket.emit 'login', data
false

View file

@ -1,6 +0,0 @@
import $ from 'jquery'
// import 'bootstrap'
import 'bootstrap/js/dist/carousel'
import './style/custom.scss'

View file

@ -1,10 +0,0 @@
# init Socket.IO
socket = io()
$('form[name="fftcg-login"]').submit ->
data =
uname: $('input[name="uname"]').val()
password: $('input[name="password"]').val()
@reset()
socket.emit 'login', data
false

View file

@ -4,7 +4,7 @@ module.exports = {
mode: 'development',
entry: {
index: './src/index.js',
index: './src/index.coffee',
game: './src/game.coffee'
},