Skip to content

Commit

Permalink
Merge pull request #513 from corespring/feature/PE-452-refactor-depen…
Browse files Browse the repository at this point in the history
…dencies

Feature/pe 452 refactor dependencies
  • Loading branch information
evaneus committed Mar 1, 2016
2 parents 2289174 + 9d75aca commit 662f6de
Show file tree
Hide file tree
Showing 48 changed files with 112 additions and 92 deletions.
20 changes: 14 additions & 6 deletions modules/container-client/grunt/config/devEditor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@ _ = require 'lodash'

editorSrcs = [
'bower_components/angular-animate/angular-animate(.min).js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls(.min).js',
'bower_components/angular-route/angular-route(.min).js',
'bower_components/angular-ui-ace/ui-ace(.min).js',
'bower_components/angular-ui-router/release/angular-ui-router(.min).js',
'bower_components/wiggi-wiz/dist/wiggi-wiz.js',
'bower_components/select2/select2(.min).js',
'bower_components/angular-ui-select2/src/select2.js',
'bower_components/angular-ui/build/angular-ui(.min).js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls(.min).js',
'bower_components/angular-ui-ace/ui-ace(.min).js',
'bower_components/jquery.browser/dist/jquery.browser(.min).js',
'bower_components/select2/select2(.min).js',
'bower_components/undo.js/undo.js',
'bower_components/wiggi-wiz/dist/wiggi-wiz.js',
'js/corespring/core-library.js',
'js/corespring/server/init-core-library.js',
'js/dev-editor/**/*.js',
'js/editing/**/*.js',
'js/editor/**/*.js',
'js/render/services/**/*.js',
'js/render/directives/**/*.js',
'js/render/controllers/**/*.js'
'js/render/directives/**/*.js',
'js/render/services/**/*.js',
]

exports.js =
Expand Down Expand Up @@ -51,6 +52,13 @@ exports.ngModules = _.union(player.ngModules, [
'corespring-dev-editor.controllers',
'corespring-dev-editor.directives',
'corespring-dev-editor.services',
'corespring-editing.controllers',
'corespring-editing.directives',
'corespring-editing.services',
'corespring-editing.wiggi-wiz-features',
'corespring-editing.wiggi-wiz-features.cs-image',
'corespring-editing.wiggi-wiz-features.link',
'corespring-editing.wiggi-wiz-features.mathjax',
'corespring-editor.controllers',
'corespring-editor.directives',
'corespring-editor.services',
Expand Down
29 changes: 18 additions & 11 deletions modules/container-client/grunt/config/editor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@ _ = require 'lodash'

editorSrcs = [
'bower_components/angular-animate/angular-animate(.min).js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls(.min).js',
'bower_components/angular-debounce/dist/angular-debounce(.min).js',
'bower_components/angular-route/angular-route(.min).js',
'bower_components/angular-ui-ace/ui-ace(.min).js',
'bower_components/angular-ui-router/release/angular-ui-router(.min).js',
'bower_components/wiggi-wiz/dist/wiggi-wiz.js',
'bower_components/select2/select2(.min).js',
'bower_components/angular-ui-select2/src/select2.js',
'bower_components/angular-ui/build/angular-ui(.min).js',
'bower_components/angular-ui-ace/ui-ace(.min).js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls(.min).js',
'bower_components/angular-debounce/dist/angular-debounce(.min).js',
'bower_components/jquery.browser/dist/jquery.browser(.min).js',
'bower_components/undo.js/undo.js',
'bower_components/corespring-checkbox/src/directive.js',
'bower_components/corespring-radio/src/directive.js',
'bower_components/jquery.browser/dist/jquery.browser(.min).js',
'bower_components/select2/select2(.min).js',
'bower_components/undo.js/undo.js',
'bower_components/wiggi-wiz/dist/wiggi-wiz.js',
'js/catalog/**/*.js',
'js/common/**/*.js',
'js/corespring/core-library.js',
'js/corespring/server/init-core-library.js',
'js/common/**/*.js',
'js/editing/**/*.js',
'js/editor/**/*.js',
'js/catalog/**/*.js',
'js/render/services/**/*.js',
'js/render/directives/**/*.js',
'js/render/controllers/**/*.js'
'js/render/directives/**/*.js',
'js/render/services/**/*.js'
]

exports.js =
Expand Down Expand Up @@ -53,6 +54,12 @@ exports.css =

exports.ngModules = _.union(player.ngModules, [
'corespring-common.supporting-materials',
'corespring-editing.controllers',
'corespring-editing.directives',
'corespring-editing.services',
'corespring-editing.wiggi-wiz-features.cs-image',
'corespring-editing.wiggi-wiz-features.link',
'corespring-editing.wiggi-wiz-features.mathjax',
'corespring-editor.controllers',
'corespring-editor.directives',
'corespring-editor.profile.controllers',
Expand Down
50 changes: 24 additions & 26 deletions modules/container-client/grunt/config/singleComponentEditor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,25 @@ baseName = "singleComponentEditor"

editorSrcs = [
'bower_components/angular-animate/angular-animate(.min).js',
'bower_components/wiggi-wiz/dist/wiggi-wiz.js',
'bower_components/undo.js/undo.js',
'bower_components/select2/select2(.min).js',
'bower_components/angular-ui-select2/src/select2.js',
'bower_components/angular-ui/build/angular-ui(.min).js',
'bower_components/angular-ui-ace/ui-ace(.min).js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls(.min).js',
'bower_components/angular-debounce/dist/angular-debounce(.min).js',
'bower_components/jquery.browser/dist/jquery.browser(.min).js',
'bower_components/angular-ui-ace/ui-ace(.min).js',
'bower_components/angular-ui-select2/src/select2.js',
'bower_components/angular-ui/build/angular-ui(.min).js',
'bower_components/corespring-checkbox/src/directive.js',
'bower_components/corespring-radio/src/directive.js',
'js/corespring/core-library.js',
'js/corespring/server/init-core-library.js',
'bower_components/jquery.browser/dist/jquery.browser(.min).js',
'bower_components/select2/select2(.min).js',
'bower_components/undo.js/undo.js',
'bower_components/wiggi-wiz/dist/wiggi-wiz.js',
'js/common/**/*.js',
# it would be better to pull out the js we need here instead
'js/rig/**/*.js',
'js/editor/**/*.js',
'js/component-editor/**/*.js',
'js/render/services/**/*.js',
'js/corespring/core-library.js',
'js/corespring/server/init-core-library.js',
'js/editing/**/*.js',
'js/render/controllers/**/*.js',
'js/render/directives/**/*.js',
'js/render/controllers/**/*.js'
'js/render/services/**/*.js'
]

exports.js =
Expand All @@ -53,18 +51,18 @@ exports.css =
report: "#{baseName}-css-report.json"

exports.ngModules = _.union(player.ngModules, [
'corespring.wiggi-wiz',
'corespring-editor.directives',
'corespring-editor.controllers',
'corespring-rig.directives',
'corespring-editor.services',
'ui.bootstrap.tabs',
'ui.ace',
'wiggi-wiz.features.core',
'corespring.wiggi-wiz-features.mathjax',
'corespring.wiggi-wiz-features.link',
'corespring.wiggi-wiz-features.cs-image',
'corespring-editing.controllers',
'corespring-editing.directives',
'corespring-editing.services',
'corespring-editing.wiggi-wiz-features',
'corespring-editing.wiggi-wiz-features.cs-image',
'corespring-editing.wiggi-wiz-features.link',
'corespring-editing.wiggi-wiz-features.mathjax',
'corespring-singleComponentEditor.controllers',
'corespring-singleComponentEditor.services',
'corespring-singleComponentEditor.directives'
'corespring-singleComponentEditor.services',
'corespring.wiggi-wiz',
'ui.ace',
'ui.bootstrap.tabs',
'wiggi-wiz.features.core'
])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular.module('corespring-editing.controllers', [ ]);
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
angular.module('corespring-editor.controllers')
angular.module('corespring-editing.controllers')
.controller('ClientSidePreview', [
'$log',
'$scope',
'ComponentData',
'ClientSidePlayerService',
'STATIC_PATHS',
'ComponentData',
'EDITOR_EVENTS',
'STATIC_PATHS',
function ClientSidePreview(
$log,
$scope,
ClientSidePlayerServiceDef,
ComponentData,
ClientSidePlayerServiceDef,
STATIC_PATHS,
EDITOR_EVENTS) {
EDITOR_EVENTS,
STATIC_PATHS
) {

$scope.playerLabelImg = STATIC_PATHS.assets + '/item-player-label.png';

Expand Down Expand Up @@ -114,6 +115,3 @@ angular.module('corespring-editor.controllers')

}]);

angular.module('corespring-editor.controllers').constant('EDITOR_EVENTS', {
CONTENT_ADDED_TO_EDITOR: 'content.added.to.editor'
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
angular.module('corespring-editing.controllers').constant('EDITOR_EVENTS', {
CONTENT_ADDED_TO_EDITOR: 'content.added.to.editor'
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular.module('corespring-editing.directives', [ ]);
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
angular.module('corespring-editor.directives')
.directive('previewPlayerControlPanel', ['$log',
angular.module('corespring-editing.directives')
.directive('previewPlayerControlPanel', [
'$log',
function($log){

function link($scope, $element, $attrs){
Expand Down Expand Up @@ -29,7 +30,7 @@ angular.module('corespring-editor.directives')
mode: '=',
score: '='
},
templateUrl: '/editor/question/directives/preview-player-control-panel.html'
templateUrl: '/editing/directives/preview-player-control-panel.html'
};
}
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Non optimized preview player for the editor
*/
angular.module('corespring-editor.directives')
angular.module('corespring-editing.directives')
.directive('previewPlayer', ['$log', 'ComponentRegister', 'ComponentData',
function($log, ComponentRegister, ComponentData) {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular.module('corespring-editing.services', [ ]);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring-editor.services')
angular.module('corespring-editing.services')
.service('ComponentData', [
'$timeout',
'LogFactory',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring-editor.services')
angular.module('corespring-editing.services')
.service('ComponentDefaultData', [
'LogFactory',
function(LogFactory) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring-editor.services')
angular.module('corespring-editing.services')
.service('EditorDialogTemplate', [function() {

function EditorDialogTemplate() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
angular.module('corespring-editing.wiggi-wiz-features', [
'corespring-editing.wiggi-wiz-features.cs-image',
'corespring-editing.wiggi-wiz-features.footnotes',
'corespring-editing.wiggi-wiz-features.link',
'corespring-editing.wiggi-wiz-features.mathjax'
]);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular.module('corespring-editing.wiggi-wiz-features.cs-image', []);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.cs-image').factory('ImageFeature', [
angular.module('corespring-editing.wiggi-wiz-features.cs-image').factory('ImageFeature', [
'Image',
'TemplateUtils',
function(ImageDef, TemplateUtils) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.cs-image').directive('imageHolder', ['$log', 'ImageFeature',
angular.module('corespring-editing.wiggi-wiz-features.cs-image').directive('imageHolder', ['$log', 'ImageFeature',

function($log, ImageFeature) {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular.module('corespring-editing.wiggi-wiz-features.footnotes', []);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.footnotes').factory('WiggiFootnotesFeatureDef', [
angular.module('corespring-editing.wiggi-wiz-features.footnotes').factory('WiggiFootnotesFeatureDef', [
'LogFactory',
function(LogFactory) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.footnotes').directive('footnotesDialog', [
angular.module('corespring-editing.wiggi-wiz-features.footnotes').directive('footnotesDialog', [
'LogFactory',
function(LogFactory) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.footnotes').directive('footnotesHolder', [
angular.module('corespring-editing.wiggi-wiz-features.footnotes').directive('footnotesHolder', [
'LogFactory',
function(LogFactory) {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular.module('corespring-editing.wiggi-wiz-features.link', []);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.link').factory('WiggiLinkFeatureDef', [ '$compile', '$timeout',
angular.module('corespring-editing.wiggi-wiz-features.link').factory('WiggiLinkFeatureDef', [ '$compile', '$timeout',

function($compile, $timeout) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.link').directive('linkHolder', ['$log',
angular.module('corespring-editing.wiggi-wiz-features.link').directive('linkHolder', ['$log',

function($log) {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular.module('corespring-editing.wiggi-wiz-features.mathjax', []);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.mathjax').factory('WiggiMathJaxFeatureDef', [
angular.module('corespring-editing.wiggi-wiz-features.mathjax').factory('WiggiMathJaxFeatureDef', [
'MathJaxService',
'MathFormatUtils',
'$rootScope',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.mathjax').service('MathFormatUtils', ['$log',
angular.module('corespring-editing.wiggi-wiz-features.mathjax').service('MathFormatUtils', ['$log',
function($log) {

function MathFormatUtils() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global MathJax */
angular.module('corespring.wiggi-wiz-features.mathjax').directive('mathjaxDialog', [
angular.module('corespring-editing.wiggi-wiz-features.mathjax').directive('mathjaxDialog', [
'$log',
'$timeout',
'MathFormatUtils',
Expand Down Expand Up @@ -84,7 +84,7 @@ angular.module('corespring.wiggi-wiz-features.mathjax').directive('mathjaxDialog
link: link,
require: 'ngModel',
replace: true,
templateUrl: '/editor/question/wiggi-wiz-features/mathjax/mathjax-dialog.html',
templateUrl: '/editing/wiggi-wiz-features/mathjax/mathjax-dialog.html',
};
}
]);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('corespring.wiggi-wiz-features.mathjax')
angular.module('corespring-editing.wiggi-wiz-features.mathjax')
.directive('mathjaxHolder',
['$log',
'$templateCache',
Expand All @@ -17,7 +17,7 @@ angular.module('corespring.wiggi-wiz-features.mathjax')
function compile($element) {
html = $element.html();
$element.addClass('mathjax-holder');
var template = $templateCache.get('/editor/question/wiggi-wiz-features/mathjax/mathjax-holder.html');
var template = $templateCache.get('/editing/wiggi-wiz-features/mathjax/mathjax-holder.html');
$element.html(template);
return link;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
angular.module('corespring-editor.controllers', [
'wiggi-wiz.services',
'corespring.wiggi-wiz-features',
'corespring-editing.wiggi-wiz-features',
'corespring-common.directives'
]);

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('ClientSidePreview', function() {
ComponentData.reset.calls.reset();
});

beforeEach(angular.mock.module('corespring-editor.controllers'));
beforeEach(angular.mock.module('corespring-editing.controllers'));

beforeEach(module(function($provide) {
$provide.value('ComponentData', ComponentData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('component data', function() {

beforeEach(angular.mock.module('corespring-player.services'));
beforeEach(angular.mock.module('corespring-common.services'));
beforeEach(angular.mock.module('corespring-editor.services'));
beforeEach(angular.mock.module('corespring-editing.services'));

beforeEach(module(function($provide){
$provide.value('$timeout', function(fn){
Expand Down
Loading

0 comments on commit 662f6de

Please sign in to comment.