Skip to content

Commit

Permalink
Remove aliases in webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Jun 1, 2017
1 parent e5f1a22 commit e81aa97
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 78 deletions.
2 changes: 1 addition & 1 deletion src/code_manager/model/CodeMirrorEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var Backbone = require('backbone');
var CodeMirror = require('codemirror/lib/codemirror');
var htmlMode = require('codemirror/mode/htmlmixed/htmlmixed');
var cssMode = require('codemirror/mode/css/css');
var formatting = require('formatting');
var formatting = require('codemirror-formatting');

module.exports = Backbone.Model.extend({

Expand Down
2 changes: 1 addition & 1 deletion src/commands/view/OpenLayers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Layers = require('Navigator');
var Layers = require('navigator');

module.exports = {

Expand Down
2 changes: 1 addition & 1 deletion src/commands/view/OpenStyleManager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var StyleManager = require('StyleManager');
var StyleManager = require('style_manager');

module.exports = {

Expand Down
4 changes: 2 additions & 2 deletions src/commands/view/SelectComponent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var ToolbarView = require('DomComponents/view/ToolbarView');
var Toolbar = require('DomComponents/model/Toolbar');
var ToolbarView = require('dom_components/view/ToolbarView');
var Toolbar = require('dom_components/model/Toolbar');
var key = require('keymaster');

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion src/css_composer/model/Selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = Backbone.Collection.extend({

default:
if(!this.ClassTag)
this.ClassTag = require("SelectorManager/model/Selector");
this.ClassTag = require("selector_manager/model/Selector");
model = new this.ClassTag(attrs, opts);

}
Expand Down
4 changes: 2 additions & 2 deletions src/dom_components/model/Component.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var Backbone = require('backbone');
var Components = require('./Components');
var Selectors = require('SelectorManager/model/Selectors');
var Traits = require('TraitManager/model/Traits');
var Selectors = require('selector_manager/model/Selectors');
var Traits = require('trait_manager/model/Traits');

module.exports = Backbone.Model.extend({

Expand Down
24 changes: 10 additions & 14 deletions src/dom_components/view/ToolbarView.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var DomainViews = require('Abstract/view/DomainViews');
var ToolbarButtonView = require('./ToolbarButtonView');
var Backbone = require('backbone');
var DomainViews = require('domain_abstract/view/DomainViews');
var ToolbarButtonView = require('./ToolbarButtonView');

module.exports = DomainViews.extend({
module.exports = DomainViews.extend({

itemView: ToolbarButtonView,
itemView: ToolbarButtonView,

initialize: function(opts) {
this.config = {editor: opts.editor || ''};
this.listenTo(this.collection, 'reset', this.render);
},
initialize: function(opts) {
this.config = {editor: opts.editor || ''};
this.listenTo(this.collection, 'reset', this.render);
},

});

});
});
2 changes: 1 addition & 1 deletion src/domain_abstract/ui/InputColor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var Backbone = require('backbone');
var Input = require('./Input');
var Spectrum = require('Spectrum');
var Spectrum = require('spectrum-colorpicker');

module.exports = Input.extend({

Expand Down
34 changes: 17 additions & 17 deletions src/editor/model/Editor.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
var deps = [
require('Utils'),
require('StorageManager'),
require('DeviceManager'),
require('Parser'),
require('SelectorManager'),
require('ModalDialog'),
require('CodeManager'),
require('Panels'),
require('RichTextEditor'),
require('StyleManager'),
require('AssetManager'),
require('CssComposer'),
require('DomComponents'),
require('Canvas'),
require('Commands'),
require('BlockManager'),
require('TraitManager'),
require('storage_manager'),
require('device_manager'),
require('parser'),
require('selector_manager'),
require('modal_dialog'),
require('code_manager'),
require('panels'),
require('rich_text_editor'),
require('style_manager'),
require('asset_manager'),
require('css_composer'),
require('dom_components'),
require('canvas'),
require('commands'),
require('block_manager'),
require('trait_manager'),
];

require('backbone');
require('backboneUndo');
require('backbone-undo');
var key = require('keymaster');
/*
require('Utils');
Expand Down
2 changes: 1 addition & 1 deletion src/style_manager/view/PropertyColorView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var Backbone = require('backbone');
var PropertyView = require('./PropertyView');
var InputColor = require('Abstract/ui/InputColor');
var InputColor = require('domain_abstract/ui/InputColor');

module.exports = PropertyView.extend({

Expand Down
2 changes: 1 addition & 1 deletion src/style_manager/view/PropertyIntegerView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var Backbone = require('backbone');
var PropertyView = require('./PropertyView');
var InputNumber = require('Abstract/ui/InputNumber');
var InputNumber = require('domain_abstract/ui/InputNumber');

module.exports = PropertyView.extend({

Expand Down
2 changes: 1 addition & 1 deletion src/trait_manager/view/TraitColorView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var TraitView = require('./TraitView');
var InputColor = require('Abstract/ui/InputColor');
var InputColor = require('domain_abstract/ui/InputColor');

module.exports = TraitView.extend({
/**
Expand Down
2 changes: 1 addition & 1 deletion src/trait_manager/view/TraitNumberView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var TraitView = require('./TraitView');
var InputNumber = require('Abstract/ui/InputNumber');
var InputNumber = require('domain_abstract/ui/InputNumber');

module.exports = TraitView.extend({

Expand Down
2 changes: 1 addition & 1 deletion src/trait_manager/view/TraitsView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var DomainViews = require('Abstract/view/DomainViews');
var DomainViews = require('domain_abstract/view/DomainViews');
var TraitView = require('./TraitView');
var TraitSelectView = require('./TraitSelectView');
var TraitCheckboxView = require('./TraitCheckboxView');
Expand Down
33 changes: 0 additions & 33 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,5 @@ module.exports = {
},
resolve: {
modules: ['src', 'node_modules'],
alias: {
jquery: 'jquery/dist/jquery',
underscore: 'underscore/underscore',
backbone: 'backbone/backbone',
backboneUndo: 'backbone-undo/Backbone.Undo',
keymaster: 'keymaster/keymaster',
text: 'requirejs-text/text',
Spectrum: 'spectrum-colorpicker/spectrum',
codemirror: 'codemirror',
formatting: 'codemirror-formatting/formatting',
PluginManager: 'plugin_manager',
Abstract: 'domain_abstract',
Editor: 'editor',
AssetManager: 'asset_manager',
BlockManager: 'block_manager',
TraitManager: 'trait_manager',
StyleManager: 'style_manager',
DeviceManager: 'device_manager',
StorageManager: 'storage_manager',
PluginManager: 'plugin_manager',
Navigator: 'navigator',
DomComponents: 'dom_components',
RichTextEditor: 'rich_text_editor',
SelectorManager: 'selector_manager',
ModalDialog: 'modal_dialog',
CodeManager: 'code_manager',
CssComposer: 'css_composer',
Commands: 'commands',
Canvas: 'canvas',
Panels: 'panels',
Parser: 'parser',
Utils: 'utils',
}
},
}

0 comments on commit e81aa97

Please sign in to comment.