fnp
/
fnpeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
78b9dd3
)
Refactoring: aliasing requirejs module names
author
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 13 Sep 2013 11:35:11 +0000
(13:35 +0200)
committer
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 13 Sep 2013 11:35:11 +0000
(13:35 +0200)
25 files changed:
entrypoint.js
patch
|
blob
|
history
fnpjs/layout.js
patch
|
blob
|
history
fnpjs/runner.js
patch
|
blob
|
history
fnpjs/vbox.js
patch
|
blob
|
history
modules/data/saveDialog.js
patch
|
blob
|
history
modules/diffViewer/diffViewer.js
patch
|
blob
|
history
modules/documentCanvas/canvas/canvas.js
patch
|
blob
|
history
modules/documentCanvas/canvas/documentElement.js
patch
|
blob
|
history
modules/documentCanvas/canvas/utils.js
patch
|
blob
|
history
modules/documentCanvas/canvas/widgets.js
patch
|
blob
|
history
modules/documentCanvas/canvas/wlxmlManagers.js
patch
|
blob
|
history
modules/documentCanvas/documentCanvas.js
patch
|
blob
|
history
modules/documentHistory/documentHistory.js
patch
|
blob
|
history
modules/documentHistory/restoreDialog.js
patch
|
blob
|
history
modules/documentToolbar/documentToolbar.js
patch
|
blob
|
history
modules/indicator/indicator.js
patch
|
blob
|
history
modules/mainBar/mainBar.js
patch
|
blob
|
history
modules/metadataEditor/metadataEditor.js
patch
|
blob
|
history
modules/metadataEditor/transformations.js
patch
|
blob
|
history
modules/nodeBreadCrumbs/nodeBreadCrumbs.js
patch
|
blob
|
history
modules/nodeFamilyTree/nodeFamilyTree.js
patch
|
blob
|
history
modules/nodePane/metaWidget/metaWidget.js
patch
|
blob
|
history
modules/nodePane/nodePane.js
patch
|
blob
|
history
tests/main.js
patch
|
blob
|
history
views/tabs/tabs.js
patch
|
blob
|
history
diff --git
a/entrypoint.js
b/entrypoint.js
index
f15a832
..
251151e
100644
(file)
--- a/
entrypoint.js
+++ b/
entrypoint.js
@@
-4,6
+4,16
@@
requirejs.config({
baseUrl: '/static/editor',
requirejs.config({
baseUrl: '/static/editor',
+ map: {
+ '*':
+ {
+ 'libs/jquery': 'libs/jquery-1.9.1.min',
+ 'libs/underscore': 'libs/underscore-min',
+ 'libs/bootstrap': 'libs/bootstrap/js/bootstrap.min',
+ 'libs/backbone': 'libs/backbone-min'
+ }
+ },
+
shim: {
'libs/jquery-1.9.1.min': {
exports: '$',
shim: {
'libs/jquery-1.9.1.min': {
exports: '$',
@@
-12,22
+22,22
@@
exports: '_'
},
'libs/bootstrap/js/bootstrap.min': {
exports: '_'
},
'libs/bootstrap/js/bootstrap.min': {
- deps: ['libs/jquery
-1.9.1.min
']
+ deps: ['libs/jquery']
},
'libs/backbone-min': {
exports: 'Backbone',
},
'libs/backbone-min': {
exports: 'Backbone',
- deps: ['libs/jquery
-1.9.1.min', 'libs/underscore-min
']
+ deps: ['libs/jquery
', 'libs/underscore
']
}
}
});
requirejs([
}
}
});
requirejs([
- 'libs/jquery
-1.9.1.min
',
+ 'libs/jquery',
'fnpjs/runner',
'rng',
'./modules',
'fnpjs/runner',
'rng',
'./modules',
- 'libs/bootstrap
/js/bootstrap.min
'
+ 'libs/bootstrap'
], function($, runner, rng, modules) {
$(function() {
var app = new runner.Runner(rng, modules);
], function($, runner, rng, modules) {
$(function() {
var app = new runner.Runner(rng, modules);
diff --git
a/fnpjs/layout.js
b/fnpjs/layout.js
index
05252fb
..
c1d110e
100644
(file)
--- a/
fnpjs/layout.js
+++ b/
fnpjs/layout.js
@@
-1,4
+1,4
@@
-define(['libs/jquery
-1.9.1.min', 'libs/underscore-min
'], function($ ,_) {
+define(['libs/jquery
', 'libs/underscore
'], function($ ,_) {
'use strict';
var Layout = function(template) {
'use strict';
var Layout = function(template) {
diff --git
a/fnpjs/runner.js
b/fnpjs/runner.js
index
d8dcda9
..
66e0b68
100644
(file)
--- a/
fnpjs/runner.js
+++ b/
fnpjs/runner.js
@@
-1,4
+1,4
@@
-define(['libs/jquery
-1.9.1.min', 'libs/underscore-min
'], function($, _) {
+define(['libs/jquery
', 'libs/underscore
'], function($, _) {
var Runner = function(app, modules) {
var Runner = function(app, modules) {
diff --git
a/fnpjs/vbox.js
b/fnpjs/vbox.js
index
569bf16
..
dfb5a9f
100644
(file)
--- a/
fnpjs/vbox.js
+++ b/
fnpjs/vbox.js
@@
-1,4
+1,4
@@
-define(['libs/jquery
-1.9.1.min
', './layout'], function($, layout) {
+define(['libs/jquery', './layout'], function($, layout) {
var VBox = function() {};
var VBox = function() {};
diff --git
a/modules/data/saveDialog.js
b/modules/data/saveDialog.js
index
d0049d5
..
90832e6
100644
(file)
--- a/
modules/data/saveDialog.js
+++ b/
modules/data/saveDialog.js
@@
-1,8
+1,8
@@
define([
'libs/text!./saveDialog.html',
define([
'libs/text!./saveDialog.html',
-'libs/underscore
-min
',
-'libs/backbone
-min
',
-'libs/jquery
-1.9.1.min
'
+'libs/underscore',
+'libs/backbone',
+'libs/jquery'
], function(saveDialogTemplate, _, Backbone, $) {
var DialogView = Backbone.View.extend({
], function(saveDialogTemplate, _, Backbone, $) {
var DialogView = Backbone.View.extend({
diff --git
a/modules/diffViewer/diffViewer.js
b/modules/diffViewer/diffViewer.js
index
be0e431
..
e792545
100644
(file)
--- a/
modules/diffViewer/diffViewer.js
+++ b/
modules/diffViewer/diffViewer.js
@@
-1,6
+1,6
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'views/tabs/tabs',
'libs/text!./diff.html'
], function($, _, tabs, diffTemplateSrc) {
'views/tabs/tabs',
'libs/text!./diff.html'
], function($, _, tabs, diffTemplateSrc) {
diff --git
a/modules/documentCanvas/canvas/canvas.js
b/modules/documentCanvas/canvas/canvas.js
index
51af41b
..
d8db2bc
100644
(file)
--- a/
modules/documentCanvas/canvas/canvas.js
+++ b/
modules/documentCanvas/canvas/canvas.js
@@
-1,7
+1,7
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
-'libs/backbone
-min
',
+'libs/jquery',
+'libs/underscore',
+'libs/backbone',
'modules/documentCanvas/canvas/documentElement',
'modules/documentCanvas/canvas/keyboard',
'modules/documentCanvas/canvas/utils'
'modules/documentCanvas/canvas/documentElement',
'modules/documentCanvas/canvas/keyboard',
'modules/documentCanvas/canvas/utils'
diff --git
a/modules/documentCanvas/canvas/documentElement.js
b/modules/documentCanvas/canvas/documentElement.js
index
1a10c1a
..
0627bc1
100644
(file)
--- a/
modules/documentCanvas/canvas/documentElement.js
+++ b/
modules/documentCanvas/canvas/documentElement.js
@@
-1,6
+1,6
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'modules/documentCanvas/classAttributes',
'modules/documentCanvas/canvas/utils',
'modules/documentCanvas/canvas/widgets',
'modules/documentCanvas/classAttributes',
'modules/documentCanvas/canvas/utils',
'modules/documentCanvas/canvas/widgets',
diff --git
a/modules/documentCanvas/canvas/utils.js
b/modules/documentCanvas/canvas/utils.js
index
2462a29
..
0eb19d0
100644
(file)
--- a/
modules/documentCanvas/canvas/utils.js
+++ b/
modules/documentCanvas/canvas/utils.js
@@
-1,5
+1,5
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
+'libs/jquery',
], function($) {
'use strict';
], function($) {
'use strict';
diff --git
a/modules/documentCanvas/canvas/widgets.js
b/modules/documentCanvas/canvas/widgets.js
index
033feda
..
408d2c0
100644
(file)
--- a/
modules/documentCanvas/canvas/widgets.js
+++ b/
modules/documentCanvas/canvas/widgets.js
@@
-1,5
+1,5
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
+'libs/jquery',
'utils/wlxml'
], function($, wlxmlUtils) {
'utils/wlxml'
], function($, wlxmlUtils) {
diff --git
a/modules/documentCanvas/canvas/wlxmlManagers.js
b/modules/documentCanvas/canvas/wlxmlManagers.js
index
e3addb2
..
d566686
100644
(file)
--- a/
modules/documentCanvas/canvas/wlxmlManagers.js
+++ b/
modules/documentCanvas/canvas/wlxmlManagers.js
@@
-1,5
+1,5
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
+'libs/jquery',
'modules/documentCanvas/canvas/widgets'
], function($, widgets) {
'modules/documentCanvas/canvas/widgets'
], function($, widgets) {
diff --git
a/modules/documentCanvas/documentCanvas.js
b/modules/documentCanvas/documentCanvas.js
index
2f8dae5
..
3ebab2e
100644
(file)
--- a/
modules/documentCanvas/documentCanvas.js
+++ b/
modules/documentCanvas/documentCanvas.js
@@
-1,7
+1,7
@@
// Module that implements main WYSIWIG edit area
define([
// Module that implements main WYSIWIG edit area
define([
-'libs/underscore
-min
',
+'libs/underscore',
'./canvas/canvas',
'./commands',
'libs/text!./template.html'], function(_, canvas3, commands, template) {
'./canvas/canvas',
'./commands',
'libs/text!./template.html'], function(_, canvas3, commands, template) {
diff --git
a/modules/documentHistory/documentHistory.js
b/modules/documentHistory/documentHistory.js
index
c3a2f69
..
f595594
100644
(file)
--- a/
modules/documentHistory/documentHistory.js
+++ b/
modules/documentHistory/documentHistory.js
@@
-1,6
+1,6
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'./restoreDialog',
'libs/text!./templates/main.html',
'libs/text!./templates/item.html'
'./restoreDialog',
'libs/text!./templates/main.html',
'libs/text!./templates/item.html'
diff --git
a/modules/documentHistory/restoreDialog.js
b/modules/documentHistory/restoreDialog.js
index
a9de353
..
2bf16f6
100644
(file)
--- a/
modules/documentHistory/restoreDialog.js
+++ b/
modules/documentHistory/restoreDialog.js
@@
-1,8
+1,8
@@
define([
'libs/text!./templates/restoreDialog.html',
define([
'libs/text!./templates/restoreDialog.html',
-'libs/underscore
-min
',
-'libs/backbone
-min
',
-'libs/jquery
-1.9.1.min
'
+'libs/underscore',
+'libs/backbone',
+'libs/jquery'
], function(restoreDialogTemplate, _, Backbone, $) {
var DialogView = Backbone.View.extend({
], function(restoreDialogTemplate, _, Backbone, $) {
var DialogView = Backbone.View.extend({
diff --git
a/modules/documentToolbar/documentToolbar.js
b/modules/documentToolbar/documentToolbar.js
index
e3bc1eb
..
7fbf6c1
100644
(file)
--- a/
modules/documentToolbar/documentToolbar.js
+++ b/
modules/documentToolbar/documentToolbar.js
@@
-1,4
+1,4
@@
-define(['libs/jquery
-1.9.1.min', 'libs/underscore-min
', 'utils/wlxml', 'libs/text!./template.html'], function($, _, wlxmlUtils, template) {
+define(['libs/jquery
', 'libs/underscore
', 'utils/wlxml', 'libs/text!./template.html'], function($, _, wlxmlUtils, template) {
'use strict';
'use strict';
diff --git
a/modules/indicator/indicator.js
b/modules/indicator/indicator.js
index
d98fe04
..
827a4b7
100644
(file)
--- a/
modules/indicator/indicator.js
+++ b/
modules/indicator/indicator.js
@@
-1,6
+1,6
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'libs/text!./template.html'
], function($, _, template) {
'libs/text!./template.html'
], function($, _, template) {
diff --git
a/modules/mainBar/mainBar.js
b/modules/mainBar/mainBar.js
index
85551fc
..
ecf6812
100644
(file)
--- a/
modules/mainBar/mainBar.js
+++ b/
modules/mainBar/mainBar.js
@@
-1,6
+1,6
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'libs/text!./template.html'], function($, _, template) {
'use strict';
'libs/text!./template.html'], function($, _, template) {
'use strict';
diff --git
a/modules/metadataEditor/metadataEditor.js
b/modules/metadataEditor/metadataEditor.js
index
63b2404
..
94ad85b
100644
(file)
--- a/
modules/metadataEditor/metadataEditor.js
+++ b/
modules/metadataEditor/metadataEditor.js
@@
-1,6
+1,6
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'./transformations',
'libs/text!./templates/main.html',
'libs/text!./templates/item.html'
'./transformations',
'libs/text!./templates/main.html',
'libs/text!./templates/item.html'
diff --git
a/modules/metadataEditor/transformations.js
b/modules/metadataEditor/transformations.js
index
4b55488
..
a09ee38
100644
(file)
--- a/
modules/metadataEditor/transformations.js
+++ b/
modules/metadataEditor/transformations.js
@@
-1,4
+1,4
@@
-define(['libs/jquery
-1.9.1.min
'], function($) {
+define(['libs/jquery'], function($) {
'use strict';
'use strict';
diff --git
a/modules/nodeBreadCrumbs/nodeBreadCrumbs.js
b/modules/nodeBreadCrumbs/nodeBreadCrumbs.js
index
5e7fecd
..
320a1e8
100644
(file)
--- a/
modules/nodeBreadCrumbs/nodeBreadCrumbs.js
+++ b/
modules/nodeBreadCrumbs/nodeBreadCrumbs.js
@@
-1,6
+1,6
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'utils/wlxml',
'libs/text!./template.html'], function($, _, wlxmlUtils, templateSrc) {
'utils/wlxml',
'libs/text!./template.html'], function($, _, wlxmlUtils, templateSrc) {
diff --git
a/modules/nodeFamilyTree/nodeFamilyTree.js
b/modules/nodeFamilyTree/nodeFamilyTree.js
index
688f353
..
45f47c0
100644
(file)
--- a/
modules/nodeFamilyTree/nodeFamilyTree.js
+++ b/
modules/nodeFamilyTree/nodeFamilyTree.js
@@
-1,6
+1,6
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'utils/wlxml',
'libs/text!./template.html'
], function($, _, wlxmlUtils, templateSrc) {
'utils/wlxml',
'libs/text!./template.html'
], function($, _, wlxmlUtils, templateSrc) {
diff --git
a/modules/nodePane/metaWidget/metaWidget.js
b/modules/nodePane/metaWidget/metaWidget.js
index
c1d7c94
..
14ba7b6
100644
(file)
--- a/
modules/nodePane/metaWidget/metaWidget.js
+++ b/
modules/nodePane/metaWidget/metaWidget.js
@@
-1,7
+1,7
@@
define([
define([
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
-'libs/backbone
-min
',
+'libs/jquery',
+'libs/underscore',
+'libs/backbone',
'libs/text!./stringField.html'
], function($, _, Backbone, stringFieldTpl) {
'libs/text!./stringField.html'
], function($, _, Backbone, stringFieldTpl) {
diff --git
a/modules/nodePane/nodePane.js
b/modules/nodePane/nodePane.js
index
b723e68
..
f3fb68a
100644
(file)
--- a/
modules/nodePane/nodePane.js
+++ b/
modules/nodePane/nodePane.js
@@
-1,7
+1,7
@@
define([
'libs/text!./template.html',
define([
'libs/text!./template.html',
-'libs/jquery
-1.9.1.min
',
-'libs/underscore
-min
',
+'libs/jquery',
+'libs/underscore',
'modules/nodePane/metaWidget/metaWidget',
'utils/wlxml'
], function(templateSrc, $, _, metaWidget, wlxmlUtils) {
'modules/nodePane/metaWidget/metaWidget',
'utils/wlxml'
], function(templateSrc, $, _, metaWidget, wlxmlUtils) {
diff --git
a/tests/main.js
b/tests/main.js
index
cd62786
..
16154b7
100644
(file)
--- a/
tests/main.js
+++ b/
tests/main.js
@@
-14,15
+14,15
@@
'libs/jquery-1.9.1.min': {
exports: '$',
},
'libs/jquery-1.9.1.min': {
exports: '$',
},
- 'libs/underscore
-min
': {
+ 'libs/underscore': {
exports: '_'
},
'libs/bootstrap/js/bootstrap.min': {
deps: ['libs/jquery-1.9.1.min']
},
exports: '_'
},
'libs/bootstrap/js/bootstrap.min': {
deps: ['libs/jquery-1.9.1.min']
},
- 'libs/backbone
-min
': {
+ 'libs/backbone': {
exports: 'Backbone',
exports: 'Backbone',
- deps: ['libs/jquery-1.9.1.min', 'libs/underscore
-min
']
+ deps: ['libs/jquery-1.9.1.min', 'libs/underscore']
},
'libs/sinon-1.7.3': {
exports: 'sinon'
},
'libs/sinon-1.7.3': {
exports: 'sinon'
diff --git
a/views/tabs/tabs.js
b/views/tabs/tabs.js
index
6cbf28f
..
b910b92
100644
(file)
--- a/
views/tabs/tabs.js
+++ b/
views/tabs/tabs.js
@@
-1,8
+1,8
@@
define([
'libs/text!./templates/main.html',
'libs/text!./templates/handle.html',
define([
'libs/text!./templates/main.html',
'libs/text!./templates/handle.html',
-'libs/underscore
-min
',
-'libs/backbone
-min',
+'libs/underscore',
+'libs/backbone
'
], function(mainTemplate, handleTemplate, _, Backbone) {
'use strict';
], function(mainTemplate, handleTemplate, _, Backbone) {
'use strict';