Skip to content

Commit 668c71e

Browse files
committed
big update: use webpack only
1 parent 60fdae4 commit 668c71e

File tree

107 files changed

+8335
-16924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+8335
-16924
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module.exports = {
66
},
77
"extends": "eslint:recommended",
88
"parserOptions": {
9-
"sourceType": "module"
9+
"sourceType": "module",
10+
"ecmaVersion": 8
1011
},
1112
"rules": {
1213
"accessor-pairs": "error",

Annotations.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

BrainMappers.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

BrainMappersCorpusCallosum.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright [2016] OpenNeuroLab Developers
1+
Copyright [2016] BrainBox Developers
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[![CircleCI](https://circleci.com/gh/neuroanatomy/BrainBox/tree/master.svg?style=shield)](https://circleci.com/gh/neuroanatomy/BrainBox/tree/master) [![Join the chat at https://gitter.im/OpenNeuroLab-Brainbox/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/OpenNeuroLab-Brainbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
33

4-
# BrainBox - An application from the [Open Neuroimaging Laboratory](http://openneu.ro/)
4+
# BrainBox - A platform for real-time collaboration in neuroimaging
55

66
[![Join the chat at https://gitter.im/OpenNeuroLab-Brainbox/Lobby](https://badges.gitter.im/OpenNeuroLab-Brainbox/Lobby.svg)](https://gitter.im/OpenNeuroLab-Brainbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
77

app.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
Launch using > node atlasMakerServer.js
99
*/
1010

11-
const debug = 1;
12-
1311
const fs = require('fs');
1412
const express = require('express');
1513
const path = require('path');
@@ -19,13 +17,15 @@ const tracer = require('tracer').console({format: '[{{file}}:{{line}}] {{messag
1917
const cookieParser = require('cookie-parser');
2018
const bodyParser = require('body-parser');
2119
const mustacheExpress = require('mustache-express');
22-
const crypto = require('crypto');
23-
const request = require('request');
24-
const url = require('url');
25-
const async = require('async');
26-
const mongo = require('mongodb');
2720
const monk = require('monk');
2821

22+
// const debug = 1;
23+
// const crypto = require('crypto');
24+
// const request = require('request');
25+
// const url = require('url');
26+
// const async = require('async');
27+
// const mongo = require('mongodb');
28+
2929
let MONGO_DB;
3030
const DOCKER_DB = process.env.DB_PORT;
3131
const DOCKER_DEVELOP = process.env.DEVELOP;
@@ -36,6 +36,7 @@ if (DOCKER_DB) {
3636
MONGO_DB = 'localhost:27017/brainbox'; //process.env.MONGODB;
3737
}
3838

39+
/** @todo Handle the case when MongoDB is not installed */
3940
var db = monk(MONGO_DB);
4041
var expressValidator = require('express-validator');
4142

@@ -55,7 +56,7 @@ if (DOCKER_DEVELOP === '1') {
5556

5657
// Specify the folder to watch for file-changes.
5758
hotServer.watch(__dirname);
58-
tracer.log('Watching: ' + __dirname);
59+
tracer.log(`Watching: ${__dirname}`);
5960
}
6061

6162
const app = express();
@@ -249,14 +250,13 @@ app.use('/user', require('./controller/user/'));
249250

250251
// { API routes
251252
app.get('/api/getLabelsets', (req, res) => {
252-
let i;
253253
const arr = fs.readdirSync(dirname + '/public/labels/');
254254
const info = [];
255-
for (i in arr) {
256-
var json = JSON.parse(fs.readFileSync(dirname + "/public/labels/" + arr[i]));
255+
for (const label of arr) {
256+
var json = JSON.parse(fs.readFileSync(dirname + "/public/labels/" + label));
257257
info.push({
258258
name: json.name,
259-
source: arr[i]
259+
source: label
260260
});
261261
}
262262
res.send(info);

controller/mri/upload.controller.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ var upload = function(req, res) {
8585
var files = req.files;
8686

8787
delete mri._id;
88-
88+
8989
console.log("Everything is in order");
9090
console.log("username:",username);
9191
console.log("url:", url);
@@ -94,19 +94,20 @@ var upload = function(req, res) {
9494
console.log("atlasProject:", atlasProject);
9595
console.log("atlasLabelSet:", atlasLabelSet);
9696
console.log("files:", files);
97-
97+
9898
// create final filename
9999
var ext;
100100
var filename;
101101
var dir, path;
102-
if(/.nii.gz$/.test(files[0].originalname))
102+
103+
if(/.nii.gz$/.test(files[0].originalname)) {
103104
ext=".nii.gz";
104-
else
105-
if(/.mgz$/.test(files[0].originalname))
105+
} else if(/.mgz$/.test(files[0].originalname)) {
106106
ext=".mgz";
107-
else {
107+
} else {
108108
return res.json({error:"Atlas encoding neither .nii.gz nor .mgz"}).status(400).end();
109109
}
110+
110111
filename=Math.random().toString(36).slice(2)+ext;
111112

112113
// check if directory exists (it may not exist if a volume annotation is being uploaded

gulpfile.js

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)