-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alexk-restoin
committed
Jun 28, 2016
0 parents
commit 0b5b21b
Showing
56 changed files
with
1,244 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.DS_Store | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
bower_components | ||
|
||
# Build files | ||
build | ||
templates.js | ||
|
||
#webstorm | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"node": true, | ||
"jasmine": true, | ||
"browser": true, | ||
"esnext": true, | ||
"bitwise": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"indent": 2, | ||
"latedef": true, | ||
"noarg": true, | ||
"regexp": true, | ||
"undef": true, | ||
"unused": true, | ||
"strict": true, | ||
"trailing": true, | ||
"smarttabs": true, | ||
"newcap": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This project is based on https://github.com/jakemmarsh/angularjs-gulp-browserify-boilerplate |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!doctype html> | ||
<html class="no-js"> | ||
<head> | ||
<base href="/"> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<title ng-bind="pageTitle"></title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width"> | ||
|
||
<link rel="stylesheet" href="css/main.css"> | ||
</head> | ||
<body> | ||
|
||
<div ui-view></div> | ||
|
||
<script src="js/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
const AppSettings = { | ||
appTitle: 'Example Application', | ||
apiUrl: '/api/v1' | ||
}; | ||
|
||
export default AppSettings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
function ExampleCtrl() { | ||
|
||
// ViewModel | ||
const vm = this; | ||
|
||
vm.title = 'AngularJS, Gulp, and Browserify! Written with keyboards and love!'; | ||
vm.number = 1234; | ||
|
||
} | ||
|
||
export default { | ||
name: 'ExampleCtrl', | ||
fn: ExampleCtrl | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
import angular from 'angular'; | ||
const bulk = require('bulk-require'); | ||
|
||
const controllersModule = angular.module('app.controllers', []); | ||
|
||
const controllers = bulk(__dirname, ['./**/!(*index|*.spec).js']); | ||
|
||
Object.keys(controllers).forEach((key) => { | ||
let item = controllers[key]; | ||
|
||
controllersModule.controller(item.name, item.fn); | ||
}); | ||
|
||
export default controllersModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
function ExampleDirective() { | ||
|
||
return { | ||
restrict: 'EA', | ||
templateUrl: 'directives/example.html', | ||
scope: { | ||
title: '@', | ||
message: '@exampleDirective' | ||
}, | ||
link: (scope, element) => { | ||
element.on('click', () => { | ||
window.alert('Element clicked: ' + scope.message); | ||
}); | ||
} | ||
}; | ||
} | ||
|
||
export default { | ||
name: 'exampleDirective', | ||
fn: ExampleDirective | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
import angular from 'angular'; | ||
const bulk = require('bulk-require'); | ||
|
||
const directivesModule = angular.module('app.directives', []); | ||
|
||
const directives = bulk(__dirname, ['./**/!(*index|*.spec).js']); | ||
|
||
Object.keys(directives).forEach((key) => { | ||
let item = directives[key]; | ||
|
||
directivesModule.directive(item.name, item.fn); | ||
}); | ||
|
||
export default directivesModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
function ExampleFilter() { | ||
|
||
return function(input) { | ||
return input.replace(/keyboard/ig,'leopard'); | ||
}; | ||
|
||
} | ||
|
||
export default { | ||
name: 'ExampleFilter', | ||
fn: ExampleFilter | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
import angular from 'angular'; | ||
const bulk = require('bulk-require'); | ||
|
||
const filtersModule = angular.module('app.filters', []); | ||
|
||
const filters = bulk(__dirname, ['./**/!(*index|*.spec).js']); | ||
|
||
Object.keys(filters).forEach((key) => { | ||
let item = filters[key]; | ||
|
||
filtersModule.filter(item.name, item.fn); | ||
}); | ||
|
||
export default filtersModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict'; | ||
|
||
import angular from 'angular'; | ||
|
||
// angular modules | ||
import 'angular-ui-router'; | ||
import './templates'; | ||
import './filters'; | ||
import './controllers'; | ||
import './services'; | ||
import './directives'; | ||
|
||
// create and bootstrap application | ||
const requires = [ | ||
'ui.router', | ||
'templates', | ||
'app.filters', | ||
'app.controllers', | ||
'app.services', | ||
'app.directives' | ||
]; | ||
|
||
// mount on window for testing | ||
window.app = angular.module('app', requires); | ||
|
||
angular.module('app').constant('AppSettings', require('./constants')); | ||
|
||
angular.module('app').config(require('./on_config')); | ||
|
||
angular.module('app').run(require('./on_run')); | ||
|
||
angular.bootstrap(document, ['app'], { | ||
strictDi: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) { | ||
'ngInject'; | ||
|
||
$locationProvider.html5Mode(true); | ||
|
||
$stateProvider | ||
.state('Home', { | ||
url: '/', | ||
controller: 'ExampleCtrl as home', | ||
templateUrl: 'home.html', | ||
title: 'Home' | ||
}); | ||
|
||
$urlRouterProvider.otherwise('/'); | ||
|
||
} | ||
|
||
export default OnConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
function OnRun($rootScope, AppSettings) { | ||
'ngInject'; | ||
|
||
// change page title based on state | ||
$rootScope.$on('$stateChangeSuccess', (event, toState) => { | ||
$rootScope.pageTitle = ''; | ||
|
||
if ( toState.title ) { | ||
$rootScope.pageTitle += toState.title; | ||
$rootScope.pageTitle += ' \u2014 '; | ||
} | ||
|
||
$rootScope.pageTitle += AppSettings.appTitle; | ||
}); | ||
|
||
} | ||
|
||
export default OnRun; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
function ExampleService($http) { | ||
'ngInject'; | ||
|
||
const service = {}; | ||
|
||
service.get = function() { | ||
return new Promise((resolve, reject) => { | ||
$http.get('apiPath').success((data) => { | ||
resolve(data); | ||
}).error((err, status) => { | ||
reject(err, status); | ||
}); | ||
}); | ||
}; | ||
|
||
return service; | ||
|
||
} | ||
|
||
export default { | ||
name: 'ExampleService', | ||
fn: ExampleService | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
import angular from 'angular'; | ||
const bulk = require('bulk-require'); | ||
|
||
const servicesModule = angular.module('app.services', []); | ||
|
||
const services = bulk(__dirname, ['./**/!(*index|*.spec).js']); | ||
|
||
Object.keys(services).forEach((key) => { | ||
let item = services[key]; | ||
|
||
servicesModule.service(item.name, item.fn); | ||
}); | ||
|
||
export default servicesModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
p { | ||
margin-bottom: 1em; | ||
} | ||
|
||
.heading { | ||
margin-bottom: 0.618em; | ||
|
||
&.-large { | ||
font-size: $font-size--lg; | ||
font-weight: bold; | ||
line-height: $half-space * 3 / 2; | ||
} | ||
|
||
&.-medium { | ||
font-size: $font-size--md; | ||
font-weight: normal; | ||
line-height: $half-space; | ||
} | ||
|
||
&.-small { | ||
font-size: $font-size--sm; | ||
font-weight: bold; | ||
line-height: $half-space * 2 / 3; | ||
} | ||
|
||
&.-smallest { | ||
font-size: $font-size--xs; | ||
font-weight: bold; | ||
} | ||
} | ||
|
||
h1 { | ||
@extend .heading.-large; | ||
} | ||
|
||
h2 { | ||
@extend .heading.-medium; | ||
} | ||
|
||
h3 { | ||
@extend .heading.-small; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// colors | ||
// #26283B //Ebony Clay | ||
// #C41E3A //Cardinal | ||
// #FF4D00 //Vermilion | ||
// #FEA904 //Yellow Sea | ||
// #1AB385 //Mountain Meadow | ||
// #F4F4F4 //Wild Sand | ||
$font-color--dark: #333; | ||
$font-color--light: #fff; | ||
$background--light: #eee; | ||
$background--dark: #222; | ||
$blue: #1f8de2; | ||
$green: #1fe27b; | ||
$red: #e21f3f; | ||
|
||
// spacing | ||
$full-space: 40px; | ||
$half-space: 20px; | ||
|
||
// font sizing | ||
$font-size--xs: 10px; | ||
$font-size--sm: 12px; | ||
$font-size--md: 16px; | ||
$font-size--lg: 24px; | ||
$font-size--xl: 32px; |
Oops, something went wrong.