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
|
||||
RUN npm install --quiet
|
||||
|
||||
RUN mkdir /app/rookeries/dist/ \
|
||||
&& mkdir /app/rookeries/static/js/
|
||||
RUN mkdir -p /app/rookeries/dist/ \
|
||||
&& mkdir -p /app/rookeries/static/js/
|
||||
COPY static/ /app/rookeries/static/
|
||||
COPY src/ /app/rookeries/src/
|
||||
COPY tests/ /app/rookeries/tests/
|
||||
|
|
|
@ -240,9 +240,8 @@ export function loginUser(username, password) {
|
|||
if (authToken !== undefined) {
|
||||
let user = Reflect.get(json, "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]
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
|
||||
import {renderReactComponentsToString} from "../router/server";
|
||||
|
||||
function renderReactPage(request, response) {
|
||||
|
|
|
@ -8,10 +8,10 @@ User preferences via local storage
|
|||
|
||||
|
||||
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.
|
||||
var FileSystem = require("fs");
|
||||
var UUID = require("node-uuid");
|
||||
const FileSystem = require("fs");
|
||||
const UUID = require("node-uuid");
|
||||
let tempDirPath = "/tmp/rookeries";
|
||||
try {
|
||||
FileSystem.statSync(tempDirPath).isDirectory();
|
||||
|
|
|
@ -24,6 +24,14 @@ if (typeof(navigator) !== 'undefined') {
|
|||
|
||||
|
||||
class CodeEditor extends React.Component {
|
||||
static get propTypes() {
|
||||
return {
|
||||
code: React.PropTypes.string,
|
||||
language: React.PropTypes.string,
|
||||
theme: React.PropTypes.string,
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
let code = this.props.code;
|
||||
let options = {mode: this.props.language, theme: this.props.theme};
|
||||
|
|
Loading…
Reference in New Issue