index js bundle
This commit is contained in:
parent
f11d98e7e3
commit
84e487ee80
4 changed files with 22 additions and 17 deletions
21
src/index.coffee
Normal file
21
src/index.coffee
Normal 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
|
|
@ -1,6 +0,0 @@
|
|||
import $ from 'jquery'
|
||||
|
||||
// import 'bootstrap'
|
||||
import 'bootstrap/js/dist/carousel'
|
||||
|
||||
import './style/custom.scss'
|
|
@ -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
|
|
@ -4,7 +4,7 @@ module.exports = {
|
|||
mode: 'development',
|
||||
|
||||
entry: {
|
||||
index: './src/index.js',
|
||||
index: './src/index.coffee',
|
||||
game: './src/game.coffee'
|
||||
},
|
||||
|
||||
|
|
Reference in a new issue