Showing
26 changed files
with
716 additions
and
0 deletions
.editorconfig
0 → 100644
1 | +# EditorConfig helps developers define and maintain consistent | ||
2 | +# coding styles between different editors and IDEs | ||
3 | +# editorconfig.org | ||
4 | + | ||
5 | +root = true | ||
6 | + | ||
7 | + | ||
8 | +[*] | ||
9 | + | ||
10 | +# Change these settings to your own preference | ||
11 | +indent_style = space | ||
12 | +indent_size = 2 | ||
13 | + | ||
14 | +# We recommend you to keep these unchanged | ||
15 | +end_of_line = lf | ||
16 | +charset = utf-8 | ||
17 | +trim_trailing_whitespace = true | ||
18 | +insert_final_newline = true | ||
19 | + | ||
20 | +[*.md] | ||
21 | +trim_trailing_whitespace = false |
.gitattributes
0 → 100644
1 | +* text=auto |
.jscsrc
0 → 100644
.jshintrc
0 → 100644
.yo-rc.json
0 → 100644
1 | +{ | ||
2 | + "generator-karma": { | ||
3 | + "base-path": "../", | ||
4 | + "frameworks": "jasmine", | ||
5 | + "browsers": "PhantomJS", | ||
6 | + "app-files": "app/scripts/**/*.js", | ||
7 | + "files-comments": "bower:js,endbower", | ||
8 | + "bower-components-path": "bower_components", | ||
9 | + "test-files": "test/mock/**/*.js,test/spec/**/*.js" | ||
10 | + } | ||
11 | +} |
Gruntfile.js
0 → 100644
This diff is collapsed. Click to expand it.
README.md
0 → 100644
1 | +# admin-builder-boilerplate | ||
2 | + | ||
3 | +This project is generated with [yo angular generator](https://github.com/yeoman/generator-angular) | ||
4 | +version 0.15.1. | ||
5 | + | ||
6 | +## Build & development | ||
7 | + | ||
8 | +Run `grunt` for building and `grunt serve` for preview. | ||
9 | + | ||
10 | +## Testing | ||
11 | + | ||
12 | +Running `grunt test` will run the unit tests with karma. |
app/404.html
0 → 100644
1 | +<!doctype html> | ||
2 | +<html lang="en"> | ||
3 | + <head> | ||
4 | + <meta charset="utf-8"> | ||
5 | + <title>Page Not Found :(</title> | ||
6 | + <style> | ||
7 | + ::-moz-selection { | ||
8 | + background: #b3d4fc; | ||
9 | + text-shadow: none; | ||
10 | + } | ||
11 | + | ||
12 | + ::selection { | ||
13 | + background: #b3d4fc; | ||
14 | + text-shadow: none; | ||
15 | + } | ||
16 | + | ||
17 | + html { | ||
18 | + padding: 30px 10px; | ||
19 | + font-size: 20px; | ||
20 | + line-height: 1.4; | ||
21 | + color: #737373; | ||
22 | + background: #f0f0f0; | ||
23 | + -webkit-text-size-adjust: 100%; | ||
24 | + -ms-text-size-adjust: 100%; | ||
25 | + } | ||
26 | + | ||
27 | + html, | ||
28 | + input { | ||
29 | + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
30 | + } | ||
31 | + | ||
32 | + body { | ||
33 | + max-width: 500px; | ||
34 | + padding: 30px 20px 50px; | ||
35 | + border: 1px solid #b3b3b3; | ||
36 | + border-radius: 4px; | ||
37 | + margin: 0 auto; | ||
38 | + box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff; | ||
39 | + background: #fcfcfc; | ||
40 | + } | ||
41 | + | ||
42 | + h1 { | ||
43 | + margin: 0 10px; | ||
44 | + font-size: 50px; | ||
45 | + text-align: center; | ||
46 | + } | ||
47 | + | ||
48 | + h1 span { | ||
49 | + color: #bbb; | ||
50 | + } | ||
51 | + | ||
52 | + h3 { | ||
53 | + margin: 1.5em 0 0.5em; | ||
54 | + } | ||
55 | + | ||
56 | + p { | ||
57 | + margin: 1em 0; | ||
58 | + } | ||
59 | + | ||
60 | + ul { | ||
61 | + padding: 0 0 0 40px; | ||
62 | + margin: 1em 0; | ||
63 | + } | ||
64 | + | ||
65 | + .container { | ||
66 | + max-width: 380px; | ||
67 | + margin: 0 auto; | ||
68 | + } | ||
69 | + | ||
70 | + /* google search */ | ||
71 | + | ||
72 | + #goog-fixurl ul { | ||
73 | + list-style: none; | ||
74 | + padding: 0; | ||
75 | + margin: 0; | ||
76 | + } | ||
77 | + | ||
78 | + #goog-fixurl form { | ||
79 | + margin: 0; | ||
80 | + } | ||
81 | + | ||
82 | + #goog-wm-qt, | ||
83 | + #goog-wm-sb { | ||
84 | + border: 1px solid #bbb; | ||
85 | + font-size: 16px; | ||
86 | + line-height: normal; | ||
87 | + vertical-align: top; | ||
88 | + color: #444; | ||
89 | + border-radius: 2px; | ||
90 | + } | ||
91 | + | ||
92 | + #goog-wm-qt { | ||
93 | + width: 220px; | ||
94 | + height: 20px; | ||
95 | + padding: 5px; | ||
96 | + margin: 5px 10px 0 0; | ||
97 | + box-shadow: inset 0 1px 1px #ccc; | ||
98 | + } | ||
99 | + | ||
100 | + #goog-wm-sb { | ||
101 | + display: inline-block; | ||
102 | + height: 32px; | ||
103 | + padding: 0 10px; | ||
104 | + margin: 5px 0 0; | ||
105 | + white-space: nowrap; | ||
106 | + cursor: pointer; | ||
107 | + background-color: #f5f5f5; | ||
108 | + background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1); | ||
109 | + background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1); | ||
110 | + background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1); | ||
111 | + background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1); | ||
112 | + -webkit-appearance: none; | ||
113 | + -moz-appearance: none; | ||
114 | + appearance: none; | ||
115 | + } | ||
116 | + | ||
117 | + #goog-wm-sb:hover, | ||
118 | + #goog-wm-sb:focus { | ||
119 | + border-color: #aaa; | ||
120 | + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); | ||
121 | + background-color: #f8f8f8; | ||
122 | + } | ||
123 | + | ||
124 | + #goog-wm-qt:hover, | ||
125 | + #goog-wm-qt:focus { | ||
126 | + border-color: #105cb6; | ||
127 | + outline: 0; | ||
128 | + color: #222; | ||
129 | + } | ||
130 | + | ||
131 | + input::-moz-focus-inner { | ||
132 | + padding: 0; | ||
133 | + border: 0; | ||
134 | + } | ||
135 | + </style> | ||
136 | + </head> | ||
137 | + <body> | ||
138 | + <div class="container"> | ||
139 | + <h1>Not found <span>:(</span></h1> | ||
140 | + <p>Sorry, but the page you were trying to view does not exist.</p> | ||
141 | + <p>It looks like this was the result of either:</p> | ||
142 | + <ul> | ||
143 | + <li>a mistyped address</li> | ||
144 | + <li>an out-of-date link</li> | ||
145 | + </ul> | ||
146 | + <script> | ||
147 | + var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host; | ||
148 | + </script> | ||
149 | + <script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script> | ||
150 | + </div> | ||
151 | + </body> | ||
152 | +</html> |
app/favicon.ico
0 → 100644
No preview for this file type
app/images/yeoman.png
0 → 100644

13.2 KB
app/index.html
0 → 100644
1 | +<!doctype html> | ||
2 | +<html> | ||
3 | + <head> | ||
4 | + <meta charset="utf-8"> | ||
5 | + <title></title> | ||
6 | + <meta name="description" content=""> | ||
7 | + <meta name="viewport" content="width=device-width"> | ||
8 | + <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> | ||
9 | + <!-- build:css(.) styles/vendor.css --> | ||
10 | + <!-- bower:css --> | ||
11 | + <!-- endbower --> | ||
12 | + <!-- endbuild --> | ||
13 | + <!-- build:css(.tmp) styles/main.css --> | ||
14 | + <link rel="stylesheet" href="styles/main.css"> | ||
15 | + <!-- endbuild --> | ||
16 | + </head> | ||
17 | + <body ng-app="adminBuilderBoilerplateApp"> | ||
18 | + <!--[if lte IE 8]> | ||
19 | + <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | ||
20 | + <![endif]--> | ||
21 | + | ||
22 | + <!-- Add your site or application content here --> | ||
23 | + <div class="header"> | ||
24 | + <div class="navbar navbar-default" role="navigation"> | ||
25 | + <div class="container"> | ||
26 | + <div class="navbar-header"> | ||
27 | + | ||
28 | + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#js-navbar-collapse"> | ||
29 | + <span class="sr-only">Toggle navigation</span> | ||
30 | + <span class="icon-bar"></span> | ||
31 | + <span class="icon-bar"></span> | ||
32 | + <span class="icon-bar"></span> | ||
33 | + </button> | ||
34 | + | ||
35 | + <a class="navbar-brand" href="#/">adminBuilderBoilerplate</a> | ||
36 | + </div> | ||
37 | + | ||
38 | + <div class="collapse navbar-collapse" id="js-navbar-collapse"> | ||
39 | + | ||
40 | + <ul class="nav navbar-nav"> | ||
41 | + <li class="active"><a href="#/">Home</a></li> | ||
42 | + <li><a ng-href="#/about">About</a></li> | ||
43 | + <li><a ng-href="#/">Contact</a></li> | ||
44 | + </ul> | ||
45 | + </div> | ||
46 | + </div> | ||
47 | + </div> | ||
48 | + </div> | ||
49 | + | ||
50 | + <div class="container"> | ||
51 | + <div ng-view=""></div> | ||
52 | + </div> | ||
53 | + | ||
54 | + <div class="footer"> | ||
55 | + <div class="container"> | ||
56 | + <p><span class="glyphicon glyphicon-heart"></span> from the Yeoman team</p> | ||
57 | + </div> | ||
58 | + </div> | ||
59 | + | ||
60 | + | ||
61 | + <!-- Google Analytics: change UA-XXXXX-X to be your site's ID --> | ||
62 | + <script> | ||
63 | + !function(A,n,g,u,l,a,r){A.GoogleAnalyticsObject=l,A[l]=A[l]||function(){ | ||
64 | + (A[l].q=A[l].q||[]).push(arguments)},A[l].l=+new Date,a=n.createElement(g), | ||
65 | + r=n.getElementsByTagName(g)[0],a.src=u,r.parentNode.insertBefore(a,r) | ||
66 | + }(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | ||
67 | + | ||
68 | + ga('create', 'UA-XXXXX-X'); | ||
69 | + ga('send', 'pageview'); | ||
70 | + </script> | ||
71 | + | ||
72 | + <!-- build:js(.) scripts/vendor.js --> | ||
73 | + <!-- bower:js --> | ||
74 | + <script src="bower_components/jquery/dist/jquery.js"></script> | ||
75 | + <script src="bower_components/angular/angular.js"></script> | ||
76 | + <script src="bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js"></script> | ||
77 | + <script src="bower_components/angular-animate/angular-animate.js"></script> | ||
78 | + <script src="bower_components/angular-cookies/angular-cookies.js"></script> | ||
79 | + <script src="bower_components/angular-resource/angular-resource.js"></script> | ||
80 | + <script src="bower_components/angular-route/angular-route.js"></script> | ||
81 | + <script src="bower_components/angular-sanitize/angular-sanitize.js"></script> | ||
82 | + <script src="bower_components/angular-touch/angular-touch.js"></script> | ||
83 | + <!-- endbower --> | ||
84 | + <!-- endbuild --> | ||
85 | + | ||
86 | + <!-- build:js({.tmp,app}) scripts/scripts.js --> | ||
87 | + <script src="scripts/app.js"></script> | ||
88 | + <script src="scripts/controllers/main.js"></script> | ||
89 | + <script src="scripts/controllers/about.js"></script> | ||
90 | + <!-- endbuild --> | ||
91 | +</body> | ||
92 | +</html> |
app/robots.txt
0 → 100644
app/scripts/app.js
0 → 100644
1 | +'use strict'; | ||
2 | + | ||
3 | +/** | ||
4 | + * @ngdoc overview | ||
5 | + * @name adminBuilderBoilerplateApp | ||
6 | + * @description | ||
7 | + * # adminBuilderBoilerplateApp | ||
8 | + * | ||
9 | + * Main module of the application. | ||
10 | + */ | ||
11 | +angular | ||
12 | + .module('adminBuilderBoilerplateApp', [ | ||
13 | + 'ngAnimate', | ||
14 | + 'ngCookies', | ||
15 | + 'ngResource', | ||
16 | + 'ngRoute', | ||
17 | + 'ngSanitize', | ||
18 | + 'ngTouch' | ||
19 | + ]) | ||
20 | + .config(function ($routeProvider) { | ||
21 | + $routeProvider | ||
22 | + .when('/', { | ||
23 | + templateUrl: 'views/main.html', | ||
24 | + controller: 'MainCtrl', | ||
25 | + controllerAs: 'main' | ||
26 | + }) | ||
27 | + .when('/about', { | ||
28 | + templateUrl: 'views/about.html', | ||
29 | + controller: 'AboutCtrl', | ||
30 | + controllerAs: 'about' | ||
31 | + }) | ||
32 | + .otherwise({ | ||
33 | + redirectTo: '/' | ||
34 | + }); | ||
35 | + }); |
app/scripts/controllers/about.js
0 → 100644
1 | +'use strict'; | ||
2 | + | ||
3 | +/** | ||
4 | + * @ngdoc function | ||
5 | + * @name adminBuilderBoilerplateApp.controller:AboutCtrl | ||
6 | + * @description | ||
7 | + * # AboutCtrl | ||
8 | + * Controller of the adminBuilderBoilerplateApp | ||
9 | + */ | ||
10 | +angular.module('adminBuilderBoilerplateApp') | ||
11 | + .controller('AboutCtrl', function () { | ||
12 | + this.awesomeThings = [ | ||
13 | + 'HTML5 Boilerplate', | ||
14 | + 'AngularJS', | ||
15 | + 'Karma' | ||
16 | + ]; | ||
17 | + }); |
app/scripts/controllers/main.js
0 → 100644
1 | +'use strict'; | ||
2 | + | ||
3 | +/** | ||
4 | + * @ngdoc function | ||
5 | + * @name adminBuilderBoilerplateApp.controller:MainCtrl | ||
6 | + * @description | ||
7 | + * # MainCtrl | ||
8 | + * Controller of the adminBuilderBoilerplateApp | ||
9 | + */ | ||
10 | +angular.module('adminBuilderBoilerplateApp') | ||
11 | + .controller('MainCtrl', function () { | ||
12 | + this.awesomeThings = [ | ||
13 | + 'HTML5 Boilerplate', | ||
14 | + 'AngularJS', | ||
15 | + 'Karma' | ||
16 | + ]; | ||
17 | + }); |
app/styles/main.scss
0 → 100644
1 | +$icon-font-path: "../bower_components/bootstrap-sass-official/assets/fonts/bootstrap/"; | ||
2 | +// bower:scss | ||
3 | +@import "bootstrap-sass-official/assets/stylesheets/_bootstrap.scss"; | ||
4 | +// endbower | ||
5 | + | ||
6 | +.browsehappy { | ||
7 | + margin: 0.2em 0; | ||
8 | + background: #ccc; | ||
9 | + color: #000; | ||
10 | + padding: 0.2em 0; | ||
11 | +} | ||
12 | + | ||
13 | +body { | ||
14 | + padding: 0; | ||
15 | +} | ||
16 | + | ||
17 | +/* Everything but the jumbotron gets side spacing for mobile first views */ | ||
18 | +.header, | ||
19 | +.marketing, | ||
20 | +.footer { | ||
21 | + padding-left: 15px; | ||
22 | + padding-right: 15px; | ||
23 | +} | ||
24 | + | ||
25 | +/* Custom page header */ | ||
26 | +.header { | ||
27 | + border-bottom: 1px solid #e5e5e5; | ||
28 | + margin-bottom: 10px; | ||
29 | + | ||
30 | + /* Make the masthead heading the same height as the navigation */ | ||
31 | + h3 { | ||
32 | + margin-top: 0; | ||
33 | + margin-bottom: 0; | ||
34 | + line-height: 40px; | ||
35 | + padding-bottom: 19px; | ||
36 | + } | ||
37 | +} | ||
38 | + | ||
39 | +/* Custom page footer */ | ||
40 | +.footer { | ||
41 | + padding-top: 19px; | ||
42 | + color: #777; | ||
43 | + border-top: 1px solid #e5e5e5; | ||
44 | +} | ||
45 | + | ||
46 | +.container-narrow > hr { | ||
47 | + margin: 30px 0; | ||
48 | +} | ||
49 | + | ||
50 | +/* Main marketing message and sign up button */ | ||
51 | +.jumbotron { | ||
52 | + text-align: center; | ||
53 | + border-bottom: 1px solid #e5e5e5; | ||
54 | + | ||
55 | + .btn { | ||
56 | + font-size: 21px; | ||
57 | + padding: 14px 24px; | ||
58 | + } | ||
59 | +} | ||
60 | + | ||
61 | +/* Supporting marketing content */ | ||
62 | +.marketing { | ||
63 | + margin: 40px 0; | ||
64 | + | ||
65 | + p + h4 { | ||
66 | + margin-top: 28px; | ||
67 | + } | ||
68 | +} | ||
69 | + | ||
70 | +/* Responsive: Portrait tablets and up */ | ||
71 | +@media screen and (min-width: 768px) { | ||
72 | + .container { | ||
73 | + max-width: 730px; | ||
74 | + } | ||
75 | + | ||
76 | + /* Remove the padding we set earlier */ | ||
77 | + .header, | ||
78 | + .marketing, | ||
79 | + .footer { | ||
80 | + padding-left: 0; | ||
81 | + padding-right: 0; | ||
82 | + } | ||
83 | + /* Space out the masthead */ | ||
84 | + .header { | ||
85 | + margin-bottom: 30px; | ||
86 | + } | ||
87 | + /* Remove the bottom border on the jumbotron for visual effect */ | ||
88 | + .jumbotron { | ||
89 | + border-bottom: 0; | ||
90 | + } | ||
91 | +} |
app/views/about.html
0 → 100644
1 | +<p>This is the about view.</p> |
app/views/main.html
0 → 100644
1 | +<div class="jumbotron"> | ||
2 | + <h1>'Allo, 'Allo!</h1> | ||
3 | + <p class="lead"> | ||
4 | + <img src="images/yeoman.png" alt="I'm Yeoman"><br> | ||
5 | + Always a pleasure scaffolding your apps. | ||
6 | + </p> | ||
7 | + <p><a class="btn btn-lg btn-success" ng-href="#/">Splendid!<span class="glyphicon glyphicon-ok"></span></a></p> | ||
8 | +</div> | ||
9 | + | ||
10 | +<div class="row marketing"> | ||
11 | + <h4>HTML5 Boilerplate</h4> | ||
12 | + <p> | ||
13 | + HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites. | ||
14 | + </p> | ||
15 | + | ||
16 | + <h4>Angular</h4> | ||
17 | + <p> | ||
18 | + AngularJS is a toolset for building the framework most suited to your application development. | ||
19 | + </p> | ||
20 | + | ||
21 | + <h4>Karma</h4> | ||
22 | + <p>Spectacular Test Runner for JavaScript.</p> | ||
23 | +</div> |
bower.json
0 → 100644
1 | +{ | ||
2 | + "name": "admin-builder-boilerplate", | ||
3 | + "version": "0.0.0", | ||
4 | + "dependencies": { | ||
5 | + "angular": "^1.4.0", | ||
6 | + "bootstrap-sass-official": "^3.2.0", | ||
7 | + "angular-animate": "^1.4.0", | ||
8 | + "angular-cookies": "^1.4.0", | ||
9 | + "angular-resource": "^1.4.0", | ||
10 | + "angular-route": "^1.4.0", | ||
11 | + "angular-sanitize": "^1.4.0", | ||
12 | + "angular-touch": "^1.4.0" | ||
13 | + }, | ||
14 | + "devDependencies": { | ||
15 | + "angular-mocks": "^1.4.0" | ||
16 | + }, | ||
17 | + "appPath": "app", | ||
18 | + "moduleName": "adminBuilderBoilerplateApp", | ||
19 | + "overrides": { | ||
20 | + "bootstrap": { | ||
21 | + "main": [ | ||
22 | + "less/bootstrap.less", | ||
23 | + "dist/css/bootstrap.css", | ||
24 | + "dist/js/bootstrap.js" | ||
25 | + ] | ||
26 | + } | ||
27 | + } | ||
28 | +} |
package.json
0 → 100644
1 | +{ | ||
2 | + "name": "adminbuilderboilerplate", | ||
3 | + "private": true, | ||
4 | + "devDependencies": { | ||
5 | + "autoprefixer-core": "^5.2.1", | ||
6 | + "grunt": "^0.4.5", | ||
7 | + "grunt-angular-templates": "^0.5.7", | ||
8 | + "grunt-concurrent": "^1.0.0", | ||
9 | + "grunt-contrib-clean": "^0.6.0", | ||
10 | + "grunt-contrib-compass": "^1.0.0", | ||
11 | + "grunt-contrib-concat": "^0.5.0", | ||
12 | + "grunt-contrib-connect": "^0.9.0", | ||
13 | + "grunt-contrib-copy": "^0.7.0", | ||
14 | + "grunt-contrib-cssmin": "^0.12.0", | ||
15 | + "grunt-contrib-htmlmin": "^0.4.0", | ||
16 | + "grunt-contrib-imagemin": "^1.0.0", | ||
17 | + "grunt-contrib-jshint": "^0.11.0", | ||
18 | + "grunt-contrib-uglify": "^0.7.0", | ||
19 | + "grunt-contrib-watch": "^0.6.1", | ||
20 | + "grunt-filerev": "^2.1.2", | ||
21 | + "grunt-google-cdn": "^0.4.3", | ||
22 | + "grunt-jscs": "^1.8.0", | ||
23 | + "grunt-newer": "^1.1.0", | ||
24 | + "grunt-ng-annotate": "^0.9.2", | ||
25 | + "grunt-postcss": "^0.5.5", | ||
26 | + "grunt-svgmin": "^2.0.0", | ||
27 | + "grunt-usemin": "^3.0.0", | ||
28 | + "grunt-wiredep": "^2.0.0", | ||
29 | + "jit-grunt": "^0.9.1", | ||
30 | + "time-grunt": "^1.0.0", | ||
31 | + "jshint-stylish": "^1.0.0" | ||
32 | + }, | ||
33 | + "engines": { | ||
34 | + "node": ">=0.10.0" | ||
35 | + } | ||
36 | +} |
test/.jshintrc
0 → 100644
1 | +{ | ||
2 | + "bitwise": true, | ||
3 | + "browser": true, | ||
4 | + "curly": true, | ||
5 | + "eqeqeq": true, | ||
6 | + "esnext": true, | ||
7 | + "jasmine": true, | ||
8 | + "latedef": true, | ||
9 | + "noarg": true, | ||
10 | + "node": true, | ||
11 | + "strict": true, | ||
12 | + "undef": true, | ||
13 | + "unused": true, | ||
14 | + "globals": { | ||
15 | + "angular": false, | ||
16 | + "inject": false | ||
17 | + } | ||
18 | +} |
test/karma.conf.js
0 → 100644
1 | +// Karma configuration | ||
2 | +// Generated on 2016-03-28 | ||
3 | + | ||
4 | +module.exports = function(config) { | ||
5 | + 'use strict'; | ||
6 | + | ||
7 | + config.set({ | ||
8 | + // enable / disable watching file and executing tests whenever any file changes | ||
9 | + autoWatch: true, | ||
10 | + | ||
11 | + // base path, that will be used to resolve files and exclude | ||
12 | + basePath: '../', | ||
13 | + | ||
14 | + // testing framework to use (jasmine/mocha/qunit/...) | ||
15 | + // as well as any additional frameworks (requirejs/chai/sinon/...) | ||
16 | + frameworks: [ | ||
17 | + 'jasmine' | ||
18 | + ], | ||
19 | + | ||
20 | + // list of files / patterns to load in the browser | ||
21 | + files: [ | ||
22 | + // bower:js | ||
23 | + 'bower_components/jquery/dist/jquery.js', | ||
24 | + 'bower_components/angular/angular.js', | ||
25 | + 'bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js', | ||
26 | + 'bower_components/angular-animate/angular-animate.js', | ||
27 | + 'bower_components/angular-cookies/angular-cookies.js', | ||
28 | + 'bower_components/angular-resource/angular-resource.js', | ||
29 | + 'bower_components/angular-route/angular-route.js', | ||
30 | + 'bower_components/angular-sanitize/angular-sanitize.js', | ||
31 | + 'bower_components/angular-touch/angular-touch.js', | ||
32 | + 'bower_components/angular-mocks/angular-mocks.js', | ||
33 | + // endbower | ||
34 | + 'app/scripts/**/*.js', | ||
35 | + 'test/mock/**/*.js', | ||
36 | + 'test/spec/**/*.js' | ||
37 | + ], | ||
38 | + | ||
39 | + // list of files / patterns to exclude | ||
40 | + exclude: [ | ||
41 | + ], | ||
42 | + | ||
43 | + // web server port | ||
44 | + port: 8080, | ||
45 | + | ||
46 | + // Start these browsers, currently available: | ||
47 | + // - Chrome | ||
48 | + // - ChromeCanary | ||
49 | + // - Firefox | ||
50 | + // - Opera | ||
51 | + // - Safari (only Mac) | ||
52 | + // - PhantomJS | ||
53 | + // - IE (only Windows) | ||
54 | + browsers: [ | ||
55 | + 'PhantomJS' | ||
56 | + ], | ||
57 | + | ||
58 | + // Which plugins to enable | ||
59 | + plugins: [ | ||
60 | + 'karma-phantomjs-launcher', | ||
61 | + 'karma-jasmine' | ||
62 | + ], | ||
63 | + | ||
64 | + // Continuous Integration mode | ||
65 | + // if true, it capture browsers, run tests and exit | ||
66 | + singleRun: false, | ||
67 | + | ||
68 | + colors: true, | ||
69 | + | ||
70 | + // level of logging | ||
71 | + // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG | ||
72 | + logLevel: config.LOG_INFO, | ||
73 | + | ||
74 | + // Uncomment the following lines if you are using grunt's server to run the tests | ||
75 | + // proxies: { | ||
76 | + // '/': 'http://localhost:9000/' | ||
77 | + // }, | ||
78 | + // URL root prevent conflicts with the site root | ||
79 | + // urlRoot: '_karma_' | ||
80 | + }); | ||
81 | +}; |
test/spec/controllers/about.js
0 → 100644
1 | +'use strict'; | ||
2 | + | ||
3 | +describe('Controller: AboutCtrl', function () { | ||
4 | + | ||
5 | + // load the controller's module | ||
6 | + beforeEach(module('adminBuilderBoilerplateApp')); | ||
7 | + | ||
8 | + var AboutCtrl, | ||
9 | + scope; | ||
10 | + | ||
11 | + // Initialize the controller and a mock scope | ||
12 | + beforeEach(inject(function ($controller, $rootScope) { | ||
13 | + scope = $rootScope.$new(); | ||
14 | + AboutCtrl = $controller('AboutCtrl', { | ||
15 | + $scope: scope | ||
16 | + // place here mocked dependencies | ||
17 | + }); | ||
18 | + })); | ||
19 | + | ||
20 | + it('should attach a list of awesomeThings to the scope', function () { | ||
21 | + expect(AboutCtrl.awesomeThings.length).toBe(3); | ||
22 | + }); | ||
23 | +}); |
test/spec/controllers/main.js
0 → 100644
1 | +'use strict'; | ||
2 | + | ||
3 | +describe('Controller: MainCtrl', function () { | ||
4 | + | ||
5 | + // load the controller's module | ||
6 | + beforeEach(module('adminBuilderBoilerplateApp')); | ||
7 | + | ||
8 | + var MainCtrl, | ||
9 | + scope; | ||
10 | + | ||
11 | + // Initialize the controller and a mock scope | ||
12 | + beforeEach(inject(function ($controller, $rootScope) { | ||
13 | + scope = $rootScope.$new(); | ||
14 | + MainCtrl = $controller('MainCtrl', { | ||
15 | + $scope: scope | ||
16 | + // place here mocked dependencies | ||
17 | + }); | ||
18 | + })); | ||
19 | + | ||
20 | + it('should attach a list of awesomeThings to the scope', function () { | ||
21 | + expect(MainCtrl.awesomeThings.length).toBe(3); | ||
22 | + }); | ||
23 | +}); |
-
Please register or login to post a comment