Fix eslint issues and creation of directories for the frontend.
This commit is contained in:
parent
130204b495
commit
24c1d326df
|
@ -11,8 +11,8 @@ COPY package.json /app/rookeries/
|
||||||
WORKDIR /app/rookeries
|
WORKDIR /app/rookeries
|
||||||
RUN npm install --quiet
|
RUN npm install --quiet
|
||||||
|
|
||||||
RUN mkdir /app/rookeries/dist/ \
|
RUN mkdir -p /app/rookeries/dist/ \
|
||||||
&& mkdir /app/rookeries/static/js/
|
&& mkdir -p /app/rookeries/static/js/
|
||||||
COPY static/ /app/rookeries/static/
|
COPY static/ /app/rookeries/static/
|
||||||
COPY src/ /app/rookeries/src/
|
COPY src/ /app/rookeries/src/
|
||||||
COPY tests/ /app/rookeries/tests/
|
COPY tests/ /app/rookeries/tests/
|
||||||
|
|
|
@ -240,9 +240,8 @@ export function loginUser(username, password) {
|
||||||
if (authToken !== undefined) {
|
if (authToken !== undefined) {
|
||||||
let user = Reflect.get(json, "user");
|
let user = Reflect.get(json, "user");
|
||||||
return dispatch(updateUser(authToken, user));
|
return dispatch(updateUser(authToken, user));
|
||||||
} else {
|
|
||||||
return dispatch(logoutUser(`${json.description} for "${username}".`));
|
|
||||||
}
|
}
|
||||||
|
return dispatch(logoutUser(`${json.description} for "${username}".`));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
@author Dorian Pula [dorian.pula@amber-penguin-software.ca]
|
@author Dorian Pula [dorian.pula@amber-penguin-software.ca]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
import {renderReactComponentsToString} from "../router/server";
|
import {renderReactComponentsToString} from "../router/server";
|
||||||
|
|
||||||
function renderReactPage(request, response) {
|
function renderReactPage(request, response) {
|
||||||
|
|
|
@ -8,10 +8,10 @@ User preferences via local storage
|
||||||
|
|
||||||
|
|
||||||
if (typeof localStorage === "undefined" || localStorage === null) {
|
if (typeof localStorage === "undefined" || localStorage === null) {
|
||||||
var LocalStorage = require("node-localstorage").LocalStorage;
|
const LocalStorage = require("node-localstorage").LocalStorage;
|
||||||
// TODO: Change out mechanism to use other persistance setup.
|
// TODO: Change out mechanism to use other persistance setup.
|
||||||
var FileSystem = require("fs");
|
const FileSystem = require("fs");
|
||||||
var UUID = require("node-uuid");
|
const UUID = require("node-uuid");
|
||||||
let tempDirPath = "/tmp/rookeries";
|
let tempDirPath = "/tmp/rookeries";
|
||||||
try {
|
try {
|
||||||
FileSystem.statSync(tempDirPath).isDirectory();
|
FileSystem.statSync(tempDirPath).isDirectory();
|
||||||
|
|
|
@ -24,6 +24,14 @@ if (typeof(navigator) !== 'undefined') {
|
||||||
|
|
||||||
|
|
||||||
class CodeEditor extends React.Component {
|
class CodeEditor extends React.Component {
|
||||||
|
static get propTypes() {
|
||||||
|
return {
|
||||||
|
code: React.PropTypes.string,
|
||||||
|
language: React.PropTypes.string,
|
||||||
|
theme: React.PropTypes.string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let code = this.props.code;
|
let code = this.props.code;
|
||||||
let options = {mode: this.props.language, theme: this.props.theme};
|
let options = {mode: this.props.language, theme: this.props.theme};
|
||||||
|
|
Loading…
Reference in New Issue