Skip to content

Commit 99ecf38

Browse files
author
rodriguez-facundo
committed
set new paths (first iteration)
1 parent dab7c4d commit 99ecf38

File tree

26 files changed

+214
-127
lines changed

26 files changed

+214
-127
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/*.min.js

.eslintrc.js

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/**
2+
|--------------------------------------------------
3+
| sudo npm install -g eslint@latest eslint-plugin-import@latest babel-eslint
4+
|--------------------------------------------------
5+
*/
6+
module.exports = {
7+
extends: [
8+
"eslint:recommended",
9+
],
10+
env: {
11+
browser: true,
12+
commonjs: true,
13+
es6: true,
14+
node: true,
15+
jquery: true,
16+
amd: true,
17+
mocha: true,
18+
jasmine: true,
19+
phantomjs: true,
20+
worker: true,
21+
jest: true
22+
},
23+
parser: "babel-eslint",
24+
parserOptions: {
25+
"sourceType": "module", // import export syntax
26+
"ecmaVersion": 2017 // async await syntax
27+
},
28+
rules: { // 0: allow, 1: warning, 2: error
29+
"no-tabs": 2, // no tabs in code
30+
"no-empty": 0,
31+
'no-console': 0,
32+
"curly": 2,
33+
"no-global-assign": 0, // allow global variables to be modified
34+
"no-constant-condition": 0, // allow: while(true) { ... }
35+
"no-control-regex": 0, // allow regex
36+
"no-redeclare": 0, // allow redeclare a variable
37+
"no-inner-declarations": 0, // allow define functions inside functions
38+
"indent": ["error", 2, {
39+
"ObjectExpression": "first",
40+
"ArrayExpression": "first"
41+
}], // 2 spaces for indentation and consistent alignment
42+
"arrow-spacing": 2,
43+
"no-unused-vars": 0,
44+
"keyword-spacing": 2,
45+
"no-useless-escape": 0,
46+
"brace-style": 2, // enforce open bracket in same line
47+
"multiline-comment-style": [2, "starred-block"], // enforce commented block style
48+
"object-curly-newline": [2, { "multiline": true }], // enforce obj items identation
49+
"operator-linebreak": [2, "before"], // break operator to new line
50+
"space-infix-ops": 2,
51+
"no-multi-spaces": 2,
52+
"no-unneeded-ternary": 2,
53+
"no-multiple-empty-lines": 2,
54+
"spaced-comment": [2, "always"],
55+
"arrow-parens": [2, "as-needed"],
56+
"arrow-body-style": [2, "as-needed"],
57+
"object-curly-spacing": [2, "always"],
58+
"template-curly-spacing": [2, "never"],
59+
"space-before-function-paren": [1, "always"]
60+
},
61+
globals: {
62+
"G": true,
63+
"root": true,
64+
"casper": true,
65+
"message": true,
66+
"endpoint": true,
67+
"GEPPETTO": true,
68+
"gepetto-client": true,
69+
"Project": true,
70+
"Instances": true,
71+
"IPython": true,
72+
"GEPPETTO_CONFIGURATION": true,
73+
"MozWebSocket": true,
74+
"panelComponent": true,
75+
"Detector": true,
76+
"THREE": true,
77+
"VARS": true,
78+
"Stats": true,
79+
"geometry": true,
80+
"aabbMin": true,
81+
"aabbMax": true,
82+
"bb": true,
83+
"ClipboardModal": true,
84+
"Store": true,
85+
"olark": true,
86+
"google": true,
87+
"path": true,
88+
"CodeMirror": true,
89+
"Connectivity": true,
90+
"π": true,
91+
"τ": true,
92+
"halfπ": true,
93+
"dr": true,
94+
"Model": true,
95+
"Plot1": true,
96+
"PIXI": true,
97+
"stackViewerRequest": true,
98+
"_": true,
99+
"labelsInTV": true,
100+
"Backbone": true,
101+
"registeredEvents": true,
102+
"Handlebars": true,
103+
"ActiveXObject": true,
104+
"jstestdriver": true,
105+
"TestCase": true,
106+
"EMBEDDED": true,
107+
"EMBEDDERURL": true,
108+
"handleRequest": true,
109+
"_gaq": true,
110+
"Canvas1": true
111+
}
112+
};

.gitignore

-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
*.class
21
*.DS_Store
3-
META-INF
42
node_modules/
53
node/
6-
dashboard/api/session.json
7-
8-
# Build js, css
9-
webapp/css/main.css
10-
webapp/js/extensions/*
11-
webapp/WEB-INF/web.xml
12-
!webapp/js/extensions/geppetto-default
13-
!js/extensions/extensions.js
14-
15-
# Package Files #
164

175
# Editor byproducts
186
.idea/
@@ -25,8 +13,6 @@ webapp/WEB-INF/web.xml
2513
*~
2614
.imdone/
2715
/.externalToolBuilders/
28-
/.settings/*
29-
.classpath
3016

3117
#WormSim specific stuff
3218
*.css-e

js/components/interface/3dCanvas/OBJLoader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ THREE.OBJLoader.prototype = {
438438
var material = new THREE.PointsMaterial(
439439
{
440440
size: 2,
441-
map: textureLoader.load("geppetto/js/components/interface/3dCanvas/particle.png"),
441+
map: textureLoader.load("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/interface/3dCanvas/particle.png"),
442442
blending: THREE.AdditiveBlending,
443443
depthTest: false,
444444
transparent: true,

js/components/interface/3dCanvas/ThreeDEngine.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ define(['jquery'], function () {
10391039
var material = new THREE.PointsMaterial(
10401040
{
10411041
size: 2,
1042-
map: textureLoader.load("geppetto/js/components/interface/3dCanvas/3dparticle.png"),
1042+
map: textureLoader.load("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/interface/3dCanvas/3dparticle.png"),
10431043
blending: THREE.NormalBlending,
10441044
depthTest: true,
10451045
transparent: true,

js/components/interface/controlPanel/controlpanel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ define(function (require) {
1010
document.getElementsByTagName("head")[0].appendChild(link);
1111
}
1212

13-
loadCss("geppetto/js/components/interface/controlPanel/vendor/css/bootstrap-colorpicker.min.css");
13+
loadCss("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/interface/controlPanel/vendor/css/bootstrap-colorpicker.min.css");
1414

1515
//require('./vendor/css/bootstrap-colorpicker.min.css'); Matteo: This require is not working?!?
1616
var React = require('react');

js/components/interface/tutorial/Tutorial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ define(function (require) {
321321
} else {
322322
//default tutorial when user doesn't specify one for this event
323323
if (self.state.tutorialData == {}) {
324-
self.setTutorial("/org.geppetto.frontend/geppetto/js/components/interface/tutorial/configuration/experiment_loaded_tutorial.json", "Geppetto tutorial");
324+
self.setTutorial("/org.geppetto.frontend/geppetto/node_modules/@geppettoengine/geppetto-client/js/components/interface/tutorial/configuration/experiment_loaded_tutorial.json", "Geppetto tutorial");
325325
}
326326
else {
327327
self.start();

js/components/widgets/connectivity/Connectivity.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ define(function (require) {
368368
createLayoutSelector: function() {
369369

370370
function imgPath(path){
371-
return 'geppetto/js/components/widgets/connectivity/images/' + path;
371+
return 'geppetto/node_modules/@geppettoengine/geppetto-client/js/components/widgets/connectivity/images/' + path;
372372
}
373373

374374
var layoutOptions = [

js/components/widgets/connectivity/controllers/ConnectivityController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ define(function (require) {
5959
GEPPETTO.WidgetsListener.subscribe(that, id);
6060

6161
//add commands help option
62-
GEPPETTO.CommandController.updateHelpCommand(cnt, id, that.getFileComments("geppetto/js/components/widgets/connectivity/Connectivity.js"));
62+
GEPPETTO.CommandController.updateHelpCommand(cnt, id, that.getFileComments("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/widgets/connectivity/Connectivity.js"));
6363

6464
//update tags for autocompletion
6565
GEPPETTO.CommandController.updateTags(cnt.getId(), cnt);

js/components/widgets/plot/controllers/PlotsController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ define(function(require) {
5656
GEPPETTO.WidgetsListener.subscribe(that, id);
5757

5858
//add commands to console autocomplete and help option
59-
GEPPETTO.CommandController.updateHelpCommand(p, id, that.getFileComments("geppetto/js/components/widgets/plot/Plot.js"));
59+
GEPPETTO.CommandController.updateHelpCommand(p, id, that.getFileComments("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/widgets/plot/Plot.js"));
6060
//update tags for autocompletion
6161
GEPPETTO.CommandController.updateTags(p.getId(), p);
6262

js/components/widgets/popup/controllers/PopupController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ define(function (require) {
5757
GEPPETTO.WidgetsListener.subscribe(that, id);
5858

5959
//add commands to console autocomplete and help option
60-
GEPPETTO.CommandController.updateHelpCommand(p, id, that.getFileComments("geppetto/js/components/widgets/popup/Popup.js"));
60+
GEPPETTO.CommandController.updateHelpCommand(p, id, that.getFileComments("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/widgets/popup/Popup.js"));
6161

6262
//update tags for autocompletion
6363
GEPPETTO.CommandController.updateTags(p.getId(), p);

js/components/widgets/stackViewer/StackViewerComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ define(function (require) {
327327
}
328328
} else {
329329
if (this.props.canvasRef != undefined && this.props.canvasRef != null) {
330-
this.state.stackViewerPlane = this.props.canvasRef.add3DPlane(this.state.plane[0], this.state.plane[1], this.state.plane[2], this.state.plane[3], this.state.plane[4], this.state.plane[5], this.state.plane[6], this.state.plane[7], this.state.plane[8], this.state.plane[9], this.state.plane[10], this.state.plane[11], "geppetto/js/components/widgets/stackViewer/images/glass.jpg");
330+
this.state.stackViewerPlane = this.props.canvasRef.add3DPlane(this.state.plane[0], this.state.plane[1], this.state.plane[2], this.state.plane[3], this.state.plane[4], this.state.plane[5], this.state.plane[6], this.state.plane[7], this.state.plane[8], this.state.plane[9], this.state.plane[10], this.state.plane[11], "geppetto/node_modules/@geppettoengine/geppetto-client/js/components/widgets/stackViewer/images/glass.jpg");
331331
}
332332
if (this.state.stackViewerPlane.visible) {
333333
this.state.stackViewerPlane.visible = true;

js/components/widgets/stackViewer/controllers/StackViewerController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ define(function (require) {
4747
GEPPETTO.WidgetsListener.subscribe(that, id);
4848

4949
//updates help command options
50-
GEPPETTO.CommandController.updateHelpCommand(vv, id, that.getFileComments("geppetto/js/components/widgets/stackViewer/StackViewer.js"));
50+
GEPPETTO.CommandController.updateHelpCommand(vv, id, that.getFileComments("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/widgets/stackViewer/StackViewer.js"));
5151

5252
//update tags for autocompletion
5353
GEPPETTO.CommandController.updateTags(vv.getId(), vv);

js/components/widgets/treevisualiser/treevisualiserdat/controllers/TreeVisualiserControllerDAT.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ define(function (require) {
5555
GEPPETTO.WidgetsListener.subscribe(that, id);
5656

5757
// updates helpc command output
58-
GEPPETTO.CommandController.updateHelpCommand(tvdat, id, that.getFileComments("geppetto/js/components/widgets/treevisualiser/treevisualiserdat/TreeVisualiserDAT.js"));
58+
GEPPETTO.CommandController.updateHelpCommand(tvdat, id, that.getFileComments("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/widgets/treevisualiser/treevisualiserdat/TreeVisualiserDAT.js"));
5959
//update tags for autocompletion
6060
GEPPETTO.CommandController.updateTags(tvdat.getId(), tvdat);
6161

js/components/widgets/variablevisualiser/controllers/VariableVisualiserController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ define(function (require) {
4848
GEPPETTO.WidgetsListener.subscribe(that, id);
4949

5050
//updates help command options
51-
GEPPETTO.CommandController.updateHelpCommand(vv, id, that.getFileComments("geppetto/js/components/widgets/variablevisualiser/VariableVisualiser.js"));
51+
GEPPETTO.CommandController.updateHelpCommand(vv, id, that.getFileComments("geppetto/node_modules/@geppettoengine/geppetto-client/js/components/widgets/variablevisualiser/VariableVisualiser.js"));
5252
//update tags for autocompletion
5353
GEPPETTO.CommandController.updateTags(vv.getId(), vv);
5454
resolve(vv);

js/geppettoProject/ExperimentsController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ define(function (require) {
364364
}
365365

366366
// create web worker
367-
this.worker = new Worker("geppetto/js/geppettoProject/ExperimentWorker.js");
367+
this.worker = new Worker("geppetto/node_modules/@geppettoengine/geppetto-client/js/geppettoProject/ExperimentWorker.js");
368368

369369
// tells worker to update each half a second
370370
this.worker.postMessage([GEPPETTO.Events.Experiment_play, GEPPETTO.ExperimentsController.playTimerStep, this.playOptions.step]);

js/pages/admin/admin.ejs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6-
<link rel="icon" type="image/png" href="./geppetto/images/favicon.png"/>
6+
<link rel="icon" type="image/png" href="./geppetto/node_modules/@geppettoengine/geppetto-client/style/favicon.png"/>
77
<title>Admin</title>
88
<meta name="author" content="">
99

1010
<meta name="viewport" content="width=device-width,initial-scale=1">
1111

12-
<link rel="stylesheet" href="./geppetto/style/css/font-awesome.min.css"/>
13-
<link rel="stylesheet" href="./geppetto/style/css/gpt-icons.css"/>
12+
<link rel="stylesheet" href="./geppetto/node_modules/@geppettoengine/geppetto-client/style/css/font-awesome.min.css"/>
13+
<link rel="stylesheet" href="./geppetto/node_modules/@geppettoengine/geppetto-client/style/css/gpt-icons.css"/>
1414

1515
</head>
1616
<body>

js/pages/admin/admin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
define(function(require) {
55

66
window.$ = require('jquery');
7-
global.GEPPETTO_CONFIGURATION = require('../../../GeppettoConfiguration.json');
7+
global.GEPPETTO_CONFIGURATION = require('root/GeppettoConfiguration.json');
88
var React = require('react');
99
var ReactDOM = require('react-dom');
1010
var adminPanel = React.createFactory(require('./AdminPanel'));

js/pages/dashboard/dashboard.ejs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6-
<link rel="icon" type="image/png" href="./geppetto/style/favicon.png"/>
6+
<link rel="icon" type="image/png" href="./geppetto/node_modules/@geppettoengine/geppetto-client/style/favicon.png"/>
77
<title>geppetto's home</title>
88
<meta name="description" content="geppetto .:dashboard:.">
99

1010
<meta name="viewport" content="width=device-width,initial-scale=1">
1111

12-
<link rel="stylesheet" href="./geppetto/js/pages/dashboard/css/styles.css">
13-
<link rel="stylesheet" href="./geppetto/style/css/font-awesome.min.css"/>
12+
<link rel="stylesheet" href="./geppetto/node_modules/@geppettoengine/geppetto-client/js/pages/dashboard/css/styles.css">
13+
<link rel="stylesheet" href="./geppetto/node_modules/@geppettoengine/geppetto-client/style/css/font-awesome.min.css"/>
1414

1515
<script>
1616
window.EMBEDDED = <%=htmlWebpackPlugin.options.GEPPETTO_CONFIGURATION.embedded%>;
1717
window.EMBEDDERURL = "<%=htmlWebpackPlugin.options.GEPPETTO_CONFIGURATION.embedderURL%>";
1818
</script>
1919

20-
<script data-main="geppetto/js/pages/dashboard/js/main" src="./geppetto/js/pages/dashboard/js/libs/require/require.js"></script>
20+
<script data-main="geppetto/node_modules/@geppettoengine/geppetto-client/js/pages/dashboard/js/main" src="./geppetto/node_modules/@geppettoengine/geppetto-client/js/pages/dashboard/js/libs/require/require.js"></script>
2121
</head>
2222
<body>
2323

js/pages/geppetto/G.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ define(function (require) {
117117
* @returns {String} All commands and descriptions for G.
118118
*/
119119
help: function () {
120-
GEPPETTO.Utility.extractCommandsFromFile("geppetto/js/pages/geppetto/G.js", GEPPETTO.G, "G");
120+
GEPPETTO.Utility.extractCommandsFromFile("geppetto/node_modules/@geppettoengine/geppetto-client/js/pages/geppetto/G.js", GEPPETTO.G, "G");
121121
return this;
122122
},
123123

js/pages/geppetto/GEPPETTO.Main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ define(function (require) {
7878
this.statusWorker.terminate();
7979
}
8080
if (GEPPETTO_CONFIGURATION.contextPath == "/") {
81-
this.statusWorker = new Worker("/geppetto/js/geppettoProject/PullStatusWorker.js");
81+
this.statusWorker = new Worker("/geppetto/node_modules/@geppettoengine/geppetto-client/js/geppettoProject/PullStatusWorker.js");
8282
}else{
83-
this.statusWorker = new Worker("geppetto/js/geppettoProject/PullStatusWorker.js");
83+
this.statusWorker = new Worker("geppetto/node_modules/@geppettoengine/geppetto-client/js/geppettoProject/PullStatusWorker.js");
8484
}
8585

8686
this.statusWorker.postMessage(2000);

js/pages/geppetto/geppetto.ejs

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
<% } %>
1919

2020
<!-- CSS -->
21-
<link rel="stylesheet" href="<%= cssPaths%>geppetto/style/css/custom-theme/jquery-ui-1.10.0.custom.css"/>
22-
<link rel="stylesheet" href="<%= cssPaths%>geppetto/style/css/font-awesome.min.css"/>
23-
<link rel="stylesheet" href="<%= cssPaths%>geppetto/style/css/codemirror.css"/>
24-
<link rel="stylesheet" href="<%= cssPaths%>geppetto/style/css/lesser-dark.css"/>
25-
<link rel="stylesheet" href="<%= cssPaths%>geppetto/style/css/gpt-icons.css"/>
21+
<link rel="stylesheet" href="<%= cssPaths%>geppetto/node_modules/@geppettoengine/geppetto-client/style/css/custom-theme/jquery-ui-1.10.0.custom.css"/>
22+
<link rel="stylesheet" href="<%= cssPaths%>geppetto/node_modules/@geppettoengine/geppetto-client/style/css/font-awesome.min.css"/>
23+
<link rel="stylesheet" href="<%= cssPaths%>geppetto/node_modules/@geppettoengine/geppetto-client/style/css/codemirror.css"/>
24+
<link rel="stylesheet" href="<%= cssPaths%>geppetto/node_modules/@geppettoengine/geppetto-client/style/css/lesser-dark.css"/>
25+
<link rel="stylesheet" href="<%= cssPaths%>geppetto/node_modules/@geppettoengine/geppetto-client/style/css/gpt-icons.css"/>
2626

2727
<% if(htmlWebpackPlugin.options.GEPPETTO_CONFIGURATION.properties.icon.indexOf("http") !== -1){ %>
2828
<link rel="icon" type="image/png" href="<%=htmlWebpackPlugin.options.GEPPETTO_CONFIGURATION.properties.icon%>"/>

0 commit comments

Comments
 (0)