Skip to content

Commit a00545a

Browse files
committed
init
1 parent e8f87ef commit a00545a

42 files changed

Lines changed: 1375 additions & 22 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

.bowerrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"directory": "bower_components",
3+
"json": "bower.json"
4+
}

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/*.html
2+
**/templates.js

.eslintrc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"ecmaFeatures": {
3+
"arrowFunctions": true,
4+
"blockBindings": true,
5+
"classes": true,
6+
"defaultParams": true,
7+
"destructuring": true,
8+
"forOf": true,
9+
"generators": false,
10+
"modules": true,
11+
"objectLiteralComputedProperties": true,
12+
"objectLiteralDuplicateProperties": false,
13+
"objectLiteralShorthandMethods": true,
14+
"objectLiteralShorthandProperties": true,
15+
"restParams": true,
16+
"spread": true,
17+
"superInFunctions": true,
18+
"templateStrings": true,
19+
"jsx": false
20+
},
21+
"env": {
22+
"browser": true,
23+
"node": true,
24+
"es6": true
25+
},
26+
"rules": {
27+
"strict": 0,
28+
"no-underscore-dangle": 0,
29+
"quotes": [
30+
2,
31+
"single"
32+
]
33+
}
34+
}

.gitignore

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
# Logs
2-
logs
1+
lib-cov
2+
*.seed
33
*.log
4-
5-
# Runtime data
6-
pids
4+
*.csv
5+
*.dat
6+
*.out
77
*.pid
8-
*.seed
8+
*.gz
99

10-
# Directory for instrumented libs generated by jscoverage/JSCover
11-
lib-cov
12-
13-
# Coverage directory used by tools like istanbul
14-
coverage
15-
16-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17-
.grunt
18-
19-
# node-waf configuration
20-
.lock-wscript
10+
pids
11+
logs
12+
results
2113

22-
# Compiled binary addons (http://nodejs.org/api/addons.html)
23-
build/Release
14+
npm-debug.log
2415

25-
# Dependency directory
26-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27-
node_modules
16+
.idea/
17+
node_modules/
18+
coverage/
19+
bower_components/

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: node_js
2+
node_js:
3+
- "5.1.0"
4+
matrix:
5+
allow_failures:
6+
- node_js: "5.1.0"
7+
fast_finish: true
8+
before_install:
9+
- "npm install -g gulp"
10+
before_script:
11+
- "npm install"
12+
- "npm install coveralls"
13+
script:
14+
- "npm run-script test-travis"

app/app.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+

2+
export default function config($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider) {
3+
$locationProvider.hashPrefix('!');
4+
$urlRouterProvider.otherwise('/');
5+
6+
//TODO: Move to own file.
7+
$httpProvider.interceptors.push(['$q', '$injector', function seoInterceptor($q, $injector) {
8+
var $http;
9+
10+
return {
11+
response: function (response) {
12+
$http = $http || $injector.get('$http');
13+
var $timeout = $injector.get('$timeout');
14+
var $rootScope = $injector.get('$rootScope');
15+
16+
if ($http.pendingRequests.length < 1) {
17+
$timeout(function () {
18+
if ($http.pendingRequests.length < 1) {
19+
$rootScope.htmlReady();
20+
}
21+
}, 700);
22+
/*an 0.7 seconds safety interval, if there are no requests for 0.7 seconds,
23+
it means that the app is through rendering*/
24+
}
25+
return response || $q.when(response);
26+
},
27+
responseError: function (response) {
28+
return $q.reject(response);
29+
}
30+
};
31+
}]);
32+
}
33+
34+
config.$inject = ['$stateProvider', '$urlRouterProvider', '$locationProvider', '$httpProvider'];

app/app.controller.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import angular from 'angular';
2+
3+
export default class AppCtrl {
4+
constructor($scope) {
5+
this.pageTitle = 'AngularJS + ES6 application using Webpack';
6+
7+
$scope.$on('$stateChangeSuccess', (event, toState, toParams, fromState, fromParams)=> {
8+
if (angular.isDefined(toState.data.pageTitle)) {
9+
this.pageTitle = toState.data.pageTitle + ' | AngularJS + ES6 application using Webpack';
10+
}
11+
});
12+
}
13+
}
14+
15+
AppCtrl.$inject = ['$scope'];

app/app.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
body {
2+
padding-top: 50px;
3+
padding-bottom: 20px;
4+
}
5+
6+
/* Set padding to keep content from hitting the edges */
7+
.body-content {
8+
padding-left: 15px;
9+
padding-right: 15px;
10+
}
11+
12+
/* Override the default bootstrap behavior where horizontal description lists
13+
will truncate terms that are too long to fit in the left column
14+
*/
15+
.dl-horizontal dt {
16+
white-space: normal;
17+
}
18+
19+
/* Set width on the form input elements since they're 100% wide by default */
20+
input,
21+
select,
22+
textarea {
23+
max-width: 280px;
24+
}

app/app.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import './styles'
2+
3+
import angular from 'angular';
4+
import uirouter from 'angular-ui-router';
5+
6+
import './templates';
7+
8+
import 'lodash';
9+
import 'angular-animate';
10+
11+
import '../bower_components/angular-seo/angular-seo';
12+
13+
import config from './app.config';
14+
import AppCtrl from './app.controller';
15+
16+
import home from './home';
17+
import common from './common';
18+
19+
angular.module('espackApp', [uirouter, home, common, 'templates', 'seo'])
20+
.config(config)
21+
.controller('AppCtrl', AppCtrl);

0 commit comments

Comments
 (0)