Update UI build system

* Faster build times
* Smaller bundle sizes
* Adjust paths
* Cleanup npm dependencies
* Remove unneded Grunt tasks
This commit is contained in:
gconsidine
2017-09-07 18:09:14 -04:00
parent b565fd2ec1
commit c57c17546e
81 changed files with 1212 additions and 7104 deletions

View File

@@ -1,3 +1,5 @@
const templateUrl = require('@components/layout/layout.partial.html');
function AtLayoutController ($scope, strings) {
let vm = this || {};
@@ -34,12 +36,12 @@ function AtLayoutController ($scope, strings) {
AtLayoutController.$inject = ['$scope', 'ComponentsStrings'];
function atLayout (pathService) {
function atLayout () {
return {
restrict: 'E',
replace: true,
transclude: true,
templateUrl: pathService.getPartialPath('components/layout/layout'),
templateUrl,
controller: AtLayoutController,
controllerAs: 'vm',
scope: {
@@ -47,6 +49,4 @@ function atLayout (pathService) {
};
}
atLayout.$inject = ['PathService'];
export default atLayout;

View File

@@ -1,3 +1,5 @@
const templateUrl = require('@components/layout/side-nav-item.partial.html');
function atSideNavItemLink (scope, element, attrs, ctrl) {
scope.navVm = ctrl[0];
scope.layoutVm = ctrl[1];
@@ -29,10 +31,10 @@ function AtSideNavItemController ($state, $scope) {
AtSideNavItemController.$inject = ['$state', '$scope'];
function atSideNavItem (pathService) {
function atSideNavItem () {
return {
restrict: 'E',
templateUrl: pathService.getPartialPath('components/layout/side-nav-item'),
templateUrl,
require: ['^^atSideNav', '^^atLayout'],
controller: AtSideNavItemController,
controllerAs: 'vm',
@@ -46,6 +48,4 @@ function atSideNavItem (pathService) {
};
}
atSideNavItem.$inject = ['PathService'];
export default atSideNavItem;

View File

@@ -1,3 +1,5 @@
const templateUrl = require('@components/layout/side-nav.partial.html');
function atSideNavLink (scope, element, attrs, ctrl) {
scope.layoutVm = ctrl;
}
@@ -12,7 +14,7 @@ function AtSideNavController () {
}
}
function atSideNav (pathService) {
function atSideNav () {
return {
restrict: 'E',
replace: true,
@@ -21,12 +23,10 @@ function atSideNav (pathService) {
controllerAs: 'vm',
link: atSideNavLink,
transclude: true,
templateUrl: pathService.getPartialPath('components/layout/side-nav'),
templateUrl,
scope: {
}
};
}
atSideNav.$inject = ['PathService'];
export default atSideNav;

View File

@@ -1,3 +1,5 @@
const templateUrl = require('@components/layout/top-nav-item.partial.html');
function atTopNavItemLink (scope, element, attrs, ctrl) {
scope.layoutVm = ctrl;
@@ -12,12 +14,12 @@ function atTopNavItemLink (scope, element, attrs, ctrl) {
}
}
function atTopNavItem (pathService) {
function atTopNavItem () {
return {
restrict: 'E',
replace: true,
transclude: true,
templateUrl: pathService.getPartialPath('components/layout/top-nav-item'),
templateUrl,
require: '^^atLayout',
link: atTopNavItemLink,
scope: {
@@ -25,6 +27,4 @@ function atTopNavItem (pathService) {
};
}
atTopNavItem.$inject = ['PathService'];
export default atTopNavItem;