Commit 7f044682 authored by Richard Torenvliet's avatar Richard Torenvliet

Update to work with production and development

Remove specific references
parent 7d1908fa
...@@ -15,3 +15,5 @@ ...@@ -15,3 +15,5 @@
/libpeerconnection.log /libpeerconnection.log
npm-debug.log npm-debug.log
testem.log testem.log
makefile
.idea/
import JSONAPIAdapter from 'ember-data/adapters/json-api'; import JSONAPIAdapter from 'ember-data/adapters/json-api';
import ENV from 'viewer/config/environment';
export default JSONAPIAdapter.extend({ export default JSONAPIAdapter.extend({
host: 'http://localhost:8888', host: ENV.APP.APIURL,
namespace: 'api/v1' namespace: 'api/v1'
}); });
import Ember from 'ember'; import Ember from 'ember';
import ENV from 'viewer/config/environment';
const { get, inject } = Ember; const { get, inject } = Ember;
...@@ -19,7 +20,7 @@ export default Ember.Controller.extend({ ...@@ -19,7 +20,7 @@ export default Ember.Controller.extend({
socketRef: null, socketRef: null,
init() { init() {
const socket = get(this, 'websockets').socketFor('ws://localhost:8888/reconstruction'); const socket = get(this, 'websockets').socketFor(ENV.APP.websocketsURL);
socket.on('open', this.openHandler, this); socket.on('open', this.openHandler, this);
socket.on('message', this.messageHandler, this); socket.on('message', this.messageHandler, this);
......
...@@ -6,6 +6,7 @@ const Router = Ember.Router.extend({ ...@@ -6,6 +6,7 @@ const Router = Ember.Router.extend({
}); });
Router.map(function() { Router.map(function() {
this.route('index', { path: '/' });
this.route('reconstruction'); this.route('reconstruction');
}); });
......
<div class="clearfix mxn2">
<div class="col-8 px2 mx-auto">
<div class="white p4">
{{#link-to "reconstruction" class="btn white bg-silver border p4 py2"}}
<i class="fa fa-terminal" aria-hidden="true"></i> Reconstruction
{{/link-to}}
</div>
</div>
</div>
{{outlet}}
...@@ -7,6 +7,9 @@ module.exports = function(environment) { ...@@ -7,6 +7,9 @@ module.exports = function(environment) {
baseURL: '/', baseURL: '/',
locationType: 'auto', locationType: 'auto',
EmberENV: { EmberENV: {
EXTEND_PROTOTYPES: {
Date: false,
},
FEATURES: { FEATURES: {
// Here you can enable experimental features on an ember canary build // Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true // e.g. 'with-controller': true
...@@ -20,7 +23,10 @@ module.exports = function(environment) { ...@@ -20,7 +23,10 @@ module.exports = function(environment) {
}; };
if (environment === 'development') { if (environment === 'development') {
ENV.APP.staticURL = 'http://localhost:8888/data/'; ENV.APP.websocketsURL = '';
ENV.APP.staticURL = '';
ENV.APP.APIURL = '';
// ENV.APP.LOG_RESOLVER = true; // ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true; // ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true; // ENV.APP.LOG_TRANSITIONS = true;
...@@ -41,7 +47,11 @@ module.exports = function(environment) { ...@@ -41,7 +47,11 @@ module.exports = function(environment) {
} }
if (environment === 'production') { if (environment === 'production') {
ENV.APP.websocketsURL = '';
ENV.APP.staticURL = ';
ENV.APP.APIURL = '';
ENV.baseURL = '/face-reconstruction/';
ENV.rootURL = '/face-reconstruction/';
} }
return ENV; return ENV;
......
...@@ -4,21 +4,31 @@ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); ...@@ -4,21 +4,31 @@ var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) { module.exports = function(defaults) {
var app = new EmberApp(defaults, { var app = new EmberApp(defaults, {
// Add options here sourcemaps: { enabled: true, extensions: ['js']},
minifyJS: {
enabled: false
},
minifyCSS: {
enabled: false
},
fingerprint: {
enabled: true
}
}); });
// bower compoenents // bower components
app.import('bower_components/basscss/modules/align/index.css'); // TODO: fix loading bascss locally instead of including it in the index.html.
app.import('bower_components/basscss/modules/border/index.css'); //app.import('bower_components/basscss/modules/align/index.css');
app.import('bower_components/basscss/modules/flexbox/index.css'); //app.import('bower_components/basscss/modules/border/index.css');
app.import('bower_components/basscss/modules/grid/index.css'); //app.import('bower_components/basscss/modules/flexbox/index.css');
app.import('bower_components/basscss/modules/hide/index.css'); //app.import('bower_components/basscss/modules/grid/index.css');
app.import('bower_components/basscss/modules/layout/index.css'); //app.import('bower_components/basscss/modules/hide/index.css');
app.import('bower_components/basscss/modules/margin/index.css'); //app.import('bower_components/basscss/modules/layout/index.css');
app.import('bower_components/basscss/modules/padding/index.css'); //app.import('bower_components/basscss/modules/margin/index.css');
app.import('bower_components/basscss/modules/position/index.css'); //app.import('bower_components/basscss/modules/padding/index.css');
app.import('bower_components/basscss/modules/type-scale/index.css'); //app.import('bower_components/basscss/modules/position/index.css');
app.import('bower_components/basscss/modules/typography/index.css'); //app.import('bower_components/basscss/modules/type-scale/index.css');
//app.import('bower_components/basscss/modules/typography/index.css');
// npm modules // npm modules
//app.import('node_modules/basscss-responsive-margin/css/responsive-margin.css'); //app.import('node_modules/basscss-responsive-margin/css/responsive-margin.css');
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
"devDependencies": { "devDependencies": {
"basscss-responsive-margin": "^1.1.0", "basscss-responsive-margin": "^1.1.0",
"broccoli-asset-rev": "^2.4.2", "broccoli-asset-rev": "^2.4.2",
"dat-gui": "^0.5.0",
"ember-ajax": "^2.0.1", "ember-ajax": "^2.0.1",
"ember-browserify": "1.1.10", "ember-browserify": "1.1.10",
"ember-cli": "2.6.2", "ember-cli": "2.6.2",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment