Skip to content

Commit 4f74b49

Browse files
committed
Rebasing with latest fixes
REfactored main.js and routes.js to fit the new ES6 syntax
1 parent e9fe744 commit 4f74b49

18 files changed

+92300
-29
lines changed

angular/config/RoutesConfig.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
export function RoutesConfig($stateProvider, $urlRouterProvider) {
2+
3+
var getView = function(viewName) {
4+
return './views/app/' + viewName + '/' + viewName + '.html';
5+
};
6+
7+
$urlRouterProvider.otherwise('/');
8+
9+
$stateProvider
10+
.state('app', {
11+
abstract: true,
12+
views: {
13+
header: {
14+
templateUrl: getView('header')
15+
},
16+
footer: {
17+
templateUrl: getView('footer')
18+
},
19+
main: {}
20+
}
21+
})
22+
.state('app.landing', {
23+
url: '/',
24+
data: {},
25+
views: {
26+
'main@': {
27+
templateUrl: getView('landing')
28+
}
29+
}
30+
});
31+
}

angular/index.components.js

Whitespace-only changes.

angular/index.config.js

Whitespace-only changes.

angular/index.filters.js

Whitespace-only changes.

angular/index.main.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//Modules
2+
import './index.modules';
3+
4+
//Config
5+
import './index.config';
6+
7+
//Run
8+
import './index.routes';
9+
10+
//Filters
11+
import './index.filters';
12+
13+
//Components
14+
import './index.components';
15+
16+
//Services
17+
import './index.services';

angular/index.modules.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
angular.module('app', [
2+
'app.controllers',
3+
'app.filters',
4+
'app.services',
5+
'app.components',
6+
'app.routes',
7+
'app.config',
8+
'partialsModule'
9+
]);
10+
11+
angular.module('app.routes', []);
12+
angular.module('app.controllers', ['ui.router', 'ngMaterial', 'ngStorage', 'restangular', 'angular-loading-bar']);
13+
angular.module('app.filters', []);
14+
angular.module('app.services', []);
15+
angular.module('app.components', []);
16+
angular.module('app.config', []);

angular/index.routes.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import {RoutesConfig} from './config/RoutesConfig';
2+
3+
angular.module('app.routes').config(RoutesConfig);

angular/index.services.js

Whitespace-only changes.

angular/main.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"babel-preset-es2015": "^6.3.13",
77
"gulp": "^3.8.8",
88
"webpack": "^1.12.11",
9-
"webpack-dev-server": "^1.14.1"
9+
"webpack-dev-server": "^1.14.1",
10+
"webpack-stream": "^3.1.0"
1011
},
1112
"dependencies": {
1213
"eslint": "^1.10.3",

public/css/app.css

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/app.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/vendor.css

Lines changed: 14315 additions & 1 deletion
Large diffs are not rendered by default.

public/css/vendor.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/app.js

Lines changed: 155 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,155 @@
1-
!function(){"use strict";angular.module("app",["app.controllers","app.filters","app.services","app.components","app.routes","app.config","partialsModule"]),angular.module("app.routes",[]),angular.module("app.controllers",["ui.router","ngMaterial","ngStorage","restangular","angular-loading-bar"]),angular.module("app.filters",[]),angular.module("app.services",[]),angular.module("app.components",[]),angular.module("app.config",[])}(),function(){"use strict";angular.module("app.routes").config(["$stateProvider","$urlRouterProvider",function(t,r){var e=function(t){return"./views/app/pages/"+t+"/"+t+".html"};r.otherwise("/"),t.state("app",{"abstract":!0,views:{header:{templateUrl:e("header")},footer:{templateUrl:e("footer")},main:{}}}).state("app.landing",{url:"/",data:{},views:{"main@":{templateUrl:e("landing")}}})}])}(),function(){"use strict";angular.module("app.config").config(["cfpLoadingBarProvider",function(t){t.includeSpinner=!1}])}(),function(){"use strict";angular.module("app.config").config(["$mdThemingProvider",function(t){t.theme("default").primaryPalette("indigo").accentPalette("grey").warnPalette("red")}])}(),function(){"use strict";angular.module("app.filters").filter("capitalize",function(){return function(t){return t?t.replace(/([^\W_]+[^\s-]*) */g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}):""}})}(),function(){"use strict";angular.module("app.filters").filter("humanReadable",function(){return function(t){if(!t)return"";for(var r=t.split("_"),e=0;e<r.length;e++)r[e]=r[e].charAt(0).toUpperCase()+r[e].slice(1);return r.join(" ")}})}(),function(){"use strict";angular.module("app.filters").filter("truncateCharacters",function(){return function(t,r,e){if(isNaN(r))return t;if(0>=r)return"";if(t&&t.length>r){if(t=t.substring(0,r),e)for(;" "===t.charAt(t.length-1);)t=t.substr(0,t.length-1);else{var n=t.lastIndexOf(" ");-1!==n&&(t=t.substr(0,n))}return t+"..."}return t}})}(),function(){"use strict";angular.module("app.filters").filter("truncateWords",function(){return function(t,r){if(isNaN(r))return t;if(0>=r)return"";if(t){var e=t.split(/\s+/);e.length>r&&(t=e.slice(0,r).join(" ")+"...")}return t}})}(),function(){"use strict";angular.module("app.filters").filter("trustHtml",["$sce",function(t){return function(r){return t.trustAsHtml(r)}}])}(),function(){"use strict";angular.module("app.filters").filter("ucfirst",function(){return function(t){return t?t.substring(0,1).toUpperCase()+t.substring(1):null}})}(),function(){"use strict";angular.module("app.services").factory("API",["Restangular","ToastService","$localStorage",function(t,r,e){var n={"Content-Type":"application/json",Accept:"application/x.laravel.v1+json"};return t.withConfig(function(t){t.setBaseUrl("/api/").setDefaultHeaders(n).setErrorInterceptor(function(t){if(422===t.status)for(var e in t.data.errors)return r.error(t.data.errors[e][0])}).addFullRequestInterceptor(function(t,r,n,a,i){e.jwt&&(i.Authorization="Bearer "+e.jwt)})})}])}(),function(){"use strict";angular.module("app.services").factory("DialogService",["$mdDialog",function(t){return{fromTemplate:function(r,e){return r?(e||(e={}),e.templateUrl="./views/dialogs/"+r+"/"+r+".html",t.show(e)):!1},hide:function(){return t.hide()},alert:function(r,e){t.show(t.alert().title(r).content(e).ok("Ok"))},confirm:function(r,e){return t.show(t.confirm().title(r).content(e).ok("Ok").cancel("Cancel"))}}}])}(),function(){"use strict";angular.module("app.services").factory("ToastService",["$mdToast",function(t){var r=6e3,e="top right",n="OK";return{show:function(a){return a?t.show(t.simple().content(a).position(e).action(n).hideDelay(r)):!1},error:function(a){return a?t.show(t.simple().content(a).position(e).theme("warn").action(n).hideDelay(r)):!1}}}])}(),function(){"use strict";function t(){var t=this;t.laravel_description="Response macros integrated with your Angular app",t.angular_description="Query your API without worrying about validations",t.iOS=/iPad|iPhone|iPod/.test(navigator.userAgent)}angular.module("app.controllers").controller("LandingController",t)}();
1+
<<<<<<< HEAD
2+
!function(){"use strict";angular.module("app",["app.controllers","app.filters","app.services","app.components","app.routes","app.config","partialsModule"]),angular.module("app.routes",[]),angular.module("app.controllers",["ui.router","ngMaterial","ngStorage","restangular","angular-loading-bar"]),angular.module("app.filters",[]),angular.module("app.services",[]),angular.module("app.components",[]),angular.module("app.config",[])}(),function(){"use strict";angular.module("app.routes").config(["$stateProvider","$urlRouterProvider",function(t,r){var e=function(t){return"./views/app/pages/"+t+"/"+t+".html"};r.otherwise("/"),t.state("app",{"abstract":!0,views:{header:{templateUrl:e("header")},footer:{templateUrl:e("footer")},main:{}}}).state("app.landing",{url:"/",data:{},views:{"main@":{templateUrl:e("landing")}}})}])}(),function(){"use strict";angular.module("app.config").config(["cfpLoadingBarProvider",function(t){t.includeSpinner=!1}])}(),function(){"use strict";angular.module("app.config").config(["$mdThemingProvider",function(t){t.theme("default").primaryPalette("indigo").accentPalette("grey").warnPalette("red")}])}(),function(){"use strict";angular.module("app.filters").filter("capitalize",function(){return function(t){return t?t.replace(/([^\W_]+[^\s-]*) */g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}):""}})}(),function(){"use strict";angular.module("app.filters").filter("humanReadable",function(){return function(t){if(!t)return"";for(var r=t.split("_"),e=0;e<r.length;e++)r[e]=r[e].charAt(0).toUpperCase()+r[e].slice(1);return r.join(" ")}})}(),function(){"use strict";angular.module("app.filters").filter("truncateCharacters",function(){return function(t,r,e){if(isNaN(r))return t;if(0>=r)return"";if(t&&t.length>r){if(t=t.substring(0,r),e)for(;" "===t.charAt(t.length-1);)t=t.substr(0,t.length-1);else{var n=t.lastIndexOf(" ");-1!==n&&(t=t.substr(0,n))}return t+"..."}return t}})}(),function(){"use strict";angular.module("app.filters").filter("truncateWords",function(){return function(t,r){if(isNaN(r))return t;if(0>=r)return"";if(t){var e=t.split(/\s+/);e.length>r&&(t=e.slice(0,r).join(" ")+"...")}return t}})}(),function(){"use strict";angular.module("app.filters").filter("trustHtml",["$sce",function(t){return function(r){return t.trustAsHtml(r)}}])}(),function(){"use strict";angular.module("app.filters").filter("ucfirst",function(){return function(t){return t?t.substring(0,1).toUpperCase()+t.substring(1):null}})}(),function(){"use strict";angular.module("app.services").factory("API",["Restangular","ToastService","$localStorage",function(t,r,e){var n={"Content-Type":"application/json",Accept:"application/x.laravel.v1+json"};return t.withConfig(function(t){t.setBaseUrl("/api/").setDefaultHeaders(n).setErrorInterceptor(function(t){if(422===t.status)for(var e in t.data.errors)return r.error(t.data.errors[e][0])}).addFullRequestInterceptor(function(t,r,n,a,i){e.jwt&&(i.Authorization="Bearer "+e.jwt)})})}])}(),function(){"use strict";angular.module("app.services").factory("DialogService",["$mdDialog",function(t){return{fromTemplate:function(r,e){return r?(e||(e={}),e.templateUrl="./views/dialogs/"+r+"/"+r+".html",t.show(e)):!1},hide:function(){return t.hide()},alert:function(r,e){t.show(t.alert().title(r).content(e).ok("Ok"))},confirm:function(r,e){return t.show(t.confirm().title(r).content(e).ok("Ok").cancel("Cancel"))}}}])}(),function(){"use strict";angular.module("app.services").factory("ToastService",["$mdToast",function(t){var r=6e3,e="top right",n="OK";return{show:function(a){return a?t.show(t.simple().content(a).position(e).action(n).hideDelay(r)):!1},error:function(a){return a?t.show(t.simple().content(a).position(e).theme("warn").action(n).hideDelay(r)):!1}}}])}(),function(){"use strict";function t(){var t=this;t.laravel_description="Response macros integrated with your Angular app",t.angular_description="Query your API without worrying about validations",t.iOS=/iPad|iPhone|iPod/.test(navigator.userAgent)}angular.module("app.controllers").controller("LandingController",t)}();
3+
=======
4+
/******/ (function(modules) { // webpackBootstrap
5+
/******/ // The module cache
6+
/******/ var installedModules = {};
7+
8+
/******/ // The require function
9+
/******/ function __webpack_require__(moduleId) {
10+
11+
/******/ // Check if module is in cache
12+
/******/ if(installedModules[moduleId])
13+
/******/ return installedModules[moduleId].exports;
14+
15+
/******/ // Create a new module (and put it into the cache)
16+
/******/ var module = installedModules[moduleId] = {
17+
/******/ exports: {},
18+
/******/ id: moduleId,
19+
/******/ loaded: false
20+
/******/ };
21+
22+
/******/ // Execute the module function
23+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
24+
25+
/******/ // Flag the module as loaded
26+
/******/ module.loaded = true;
27+
28+
/******/ // Return the exports of the module
29+
/******/ return module.exports;
30+
/******/ }
31+
32+
33+
/******/ // expose the modules object (__webpack_modules__)
34+
/******/ __webpack_require__.m = modules;
35+
36+
/******/ // expose the module cache
37+
/******/ __webpack_require__.c = installedModules;
38+
39+
/******/ // __webpack_public_path__
40+
/******/ __webpack_require__.p = "";
41+
42+
/******/ // Load entry module and return exports
43+
/******/ return __webpack_require__(0);
44+
/******/ })
45+
/************************************************************************/
46+
/******/ ([
47+
/* 0 */
48+
/***/ function(module, exports, __webpack_require__) {
49+
50+
'use strict';
51+
52+
__webpack_require__(1);
53+
54+
__webpack_require__(2);
55+
56+
__webpack_require__(3);
57+
58+
__webpack_require__(5);
59+
60+
__webpack_require__(6);
61+
62+
__webpack_require__(7);
63+
64+
/***/ },
65+
/* 1 */
66+
/***/ function(module, exports) {
67+
68+
'use strict';
69+
70+
angular.module('app', ['app.controllers', 'app.filters', 'app.services', 'app.components', 'app.routes', 'app.config', 'partialsModule']);
71+
72+
angular.module('app.routes', []);
73+
angular.module('app.controllers', ['ui.router', 'ngMaterial', 'ngStorage', 'restangular', 'angular-loading-bar']);
74+
angular.module('app.filters', []);
75+
angular.module('app.services', []);
76+
angular.module('app.components', []);
77+
angular.module('app.config', []);
78+
79+
/***/ },
80+
/* 2 */
81+
/***/ function(module, exports) {
82+
83+
"use strict";
84+
85+
/***/ },
86+
/* 3 */
87+
/***/ function(module, exports, __webpack_require__) {
88+
89+
'use strict';
90+
91+
var _RoutesConfig = __webpack_require__(4);
92+
93+
angular.module('app.routes').config(_RoutesConfig.RoutesConfig);
94+
95+
/***/ },
96+
/* 4 */
97+
/***/ function(module, exports) {
98+
99+
'use strict';
100+
101+
Object.defineProperty(exports, "__esModule", {
102+
value: true
103+
});
104+
exports.RoutesConfig = RoutesConfig;
105+
function RoutesConfig($stateProvider, $urlRouterProvider) {
106+
107+
var getView = function getView(viewName) {
108+
return './views/app/' + viewName + '/' + viewName + '.html';
109+
};
110+
111+
$urlRouterProvider.otherwise('/');
112+
113+
$stateProvider.state('app', {
114+
abstract: true,
115+
views: {
116+
header: {
117+
templateUrl: getView('header')
118+
},
119+
footer: {
120+
templateUrl: getView('footer')
121+
},
122+
main: {}
123+
}
124+
}).state('app.landing', {
125+
url: '/',
126+
data: {},
127+
views: {
128+
'main@': {
129+
templateUrl: getView('landing')
130+
}
131+
}
132+
});
133+
}
134+
135+
/***/ },
136+
/* 5 */
137+
/***/ function(module, exports) {
138+
139+
"use strict";
140+
141+
/***/ },
142+
/* 6 */
143+
/***/ function(module, exports) {
144+
145+
"use strict";
146+
147+
/***/ },
148+
/* 7 */
149+
/***/ function(module, exports) {
150+
151+
"use strict";
152+
153+
/***/ }
154+
/******/ ]);
155+
>>>>>>> 8670b54... REfactored main.js and routes.js to fit the new ES6 syntax

0 commit comments

Comments
 (0)