ducky/web
2015-05-03
Child:275a83e4c02e
ducky/web/src/main.js
First commit. Setup project structure, start getting our registration flow set up. At this point, it runs successfully locally, assuming the auth server is running locally at slightly.local:8080. So, uh... on my computer. Also, we currently have the Register button (on the register page) disabled always, because we still need to hook up form validation and set the this.state.valid property. If that property is set to true, then the button is enabled again. Still to do: validation, logging in. Then what we have written works, minus some configuration stuff that still needs to be figured out.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/main.js Sun May 03 23:25:12 2015 -0400 1.3 @@ -0,0 +1,17 @@ 1.4 +import app from 'ampersand-app' 1.5 +import Router from './router' 1.6 +import Profiles from './models/profiles' 1.7 +import Me from './models/me' 1.8 +import normalize from 'normalize.css/normalize.css' 1.9 +import styles from './styles/main.scss' 1.10 + 1.11 +window.app = app.extend({ 1.12 + init () { 1.13 + this.profiles = new Profiles() 1.14 + this.me = new Me() 1.15 + this.router = new Router() 1.16 + this.router.history.start({ pushState: true }) 1.17 + } 1.18 +}) 1.19 + 1.20 +app.init()