Skip to content

Commit

Permalink
Built using Angular Fullstack v2.0.9 from commit e3fd00f
Browse files Browse the repository at this point in the history
  • Loading branch information
DaftMonk committed Aug 16, 2014
1 parent 35dc1ad commit 118f576
Show file tree
Hide file tree
Showing 44 changed files with 208 additions and 185 deletions.
1 change: 1 addition & 0 deletions .buildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.coffee
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
public
.tmp
.sass-cache
.idea
client/bower_components
dist
/server/config/local.env.js
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: node_js
node_js:
- '0.8'
- '0.10'
- '0.11'
before_script:
- 'npm install -g bower grunt-cli'
- 'bower install'
- npm install -g bower grunt-cli
- gem install sass
- bower install
services: mongodb
3 changes: 3 additions & 0 deletions .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"insertRoutes": true,
"registerRoutesFile": "server/routes.js",
"routesNeedle": "// Insert routes below",
"routesBase": "/api/",
"pluralizeRoutes": true,
"insertSockets": true,
"registerSocketsFile": "server/config/socketio.js",
"socketsNeedle": "// Insert sockets below",
Expand All @@ -14,6 +16,7 @@
"socketio": true,
"mongoose": true,
"auth": true,
"oauth": true,
"googleAuth": true,
"twitterAuth": true
}
Expand Down
59 changes: 45 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// Generated on 2014-08-16 using generator-angular-fullstack 2.0.9
'use strict';

module.exports = function (grunt) {
var localConfig;
try {
localConfig = require('./server/config/local.env');
} catch(e) {
localConfig = {};
}

// Load grunt tasks automatically, when needed
require('jit-grunt')(grunt, {
Expand All @@ -9,7 +16,8 @@ module.exports = function (grunt) {
ngtemplates: 'grunt-angular-templates',
cdnify: 'grunt-google-cdn',
protractor: 'grunt-protractor-runner',
injector: 'grunt-asset-injector'
injector: 'grunt-asset-injector',
buildcontrol: 'grunt-build-control'
});

// Time how long tasks take. Can help when optimizing build times
Expand All @@ -19,6 +27,7 @@ module.exports = function (grunt) {
grunt.initConfig({

// Project settings
pkg: grunt.file.readJSON('package.json'),
yeoman: {
// configurable paths
client: require('./bower.json').appPath || 'client',
Expand Down Expand Up @@ -201,11 +210,11 @@ module.exports = function (grunt) {
},

// Automatically inject Bower components into the app
bowerInstall: {
wiredep: {
target: {
src: '<%= yeoman.client %>/index.html',
ignorePath: '<%= yeoman.client %>/',
exclude: [/bootstrap-sass-official/, /bootstrap.js/, /bootstrap.css/, /font-awesome.css/ ]
exclude: [/bootstrap-sass-official/, /bootstrap.js/, '/json3/', '/es5-shim/', /bootstrap.css/, /font-awesome.css/ ]
}
},

Expand Down Expand Up @@ -277,7 +286,7 @@ module.exports = function (grunt) {

// Allow the use of non-minsafe AngularJS files. Automatically makes it
// minsafe compatible so Uglify does not destroy the ng references
ngmin: {
ngAnnotate: {
dist: {
files: [{
expand: true,
Expand All @@ -292,7 +301,7 @@ module.exports = function (grunt) {
ngtemplates: {
options: {
// This should be the name of your apps angular module
module: 'fullstackDemoApp',
module: 'demoApp',
htmlmin: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
Expand All @@ -319,7 +328,7 @@ module.exports = function (grunt) {
// Replace Google CDN references
cdnify: {
dist: {
html: ['<%= yeoman.dist %>/*.html']
html: ['<%= yeoman.dist %>/public/*.html']
}
},

Expand Down Expand Up @@ -361,6 +370,28 @@ module.exports = function (grunt) {
}
},

buildcontrol: {
options: {
dir: 'dist',
commit: true,
push: true,
connectCommits: false,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
heroku: {
options: {
remote: 'heroku',
branch: 'master'
}
},
openshift: {
options: {
remote: 'openshift',
branch: 'master'
}
}
},

// Run some tasks in parallel to speed up the build process
concurrent: {
server: [
Expand Down Expand Up @@ -420,7 +451,7 @@ module.exports = function (grunt) {
prod: {
NODE_ENV: 'production'
},
all: require('./server/config/local.env')
all: localConfig
},

// Compiles Sass to CSS
Expand Down Expand Up @@ -513,7 +544,7 @@ module.exports = function (grunt) {
setTimeout(function () {
grunt.log.writeln('Done waiting!');
done();
}, 500);
}, 1500);
});

grunt.registerTask('express-keepalive', 'Keep grunt running', function() {
Expand All @@ -522,7 +553,7 @@ module.exports = function (grunt) {

grunt.registerTask('serve', function (target) {
if (target === 'dist') {
return grunt.task.run(['build', 'env:all', 'env:prod', 'express:prod', 'open', 'express-keepalive']);
return grunt.task.run(['build', 'env:all', 'env:prod', 'express:prod', 'wait', 'open', 'express-keepalive']);
}

if (target === 'debug') {
Expand All @@ -532,7 +563,7 @@ module.exports = function (grunt) {
'injector:sass',
'concurrent:server',
'injector',
'bowerInstall',
'wiredep',
'autoprefixer',
'concurrent:debug'
]);
Expand All @@ -544,7 +575,7 @@ module.exports = function (grunt) {
'injector:sass',
'concurrent:server',
'injector',
'bowerInstall',
'wiredep',
'autoprefixer',
'express:dev',
'wait',
Expand Down Expand Up @@ -587,7 +618,7 @@ module.exports = function (grunt) {
'injector:sass',
'concurrent:test',
'injector',
'bowerInstall',
'wiredep',
'autoprefixer',
'express:dev',
'protractor'
Expand All @@ -605,12 +636,12 @@ module.exports = function (grunt) {
'injector:sass',
'concurrent:dist',
'injector',
'bowerInstall',
'wiredep',
'useminPrepare',
'autoprefixer',
'ngtemplates',
'concat',
'ngmin',
'ngAnnotate',
'copy:dist',
'cdnify',
'cssmin',
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fullstack-demo",
"name": "demo",
"version": "0.0.0",
"dependencies": {
"angular": ">=1.2.*",
Expand Down
5 changes: 3 additions & 2 deletions client/app/account/account.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

angular.module('fullstackDemoApp')
angular.module('demoApp')
.config(function ($stateProvider) {
$stateProvider
.state('login', {
Expand All @@ -16,6 +16,7 @@ angular.module('fullstackDemoApp')
.state('settings', {
url: '/settings',
templateUrl: 'app/account/settings/settings.html',
controller: 'SettingsCtrl'
controller: 'SettingsCtrl',
authenticate: true
});
});
2 changes: 1 addition & 1 deletion client/app/account/login/login.controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

angular.module('fullstackDemoApp')
angular.module('demoApp')
.controller('LoginCtrl', function ($scope, Auth, $location, $window) {
$scope.user = {};
$scope.errors = {};
Expand Down
14 changes: 9 additions & 5 deletions client/app/account/login/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,32 @@
<div class="row">
<div class="col-sm-12">
<h1>Login</h1>
<p>Try <a href="/signup">creating an account</a>, it's super easy!</p>
<p>Accounts are reset on server restart from <code>server/config/seed.js</code>. Default account is <code>test@test.com</code> / <code>test</code></p>
<p>Admin account is <code>admin@admin.com</code> / <code>admin</code></p>
</div>
<div class="col-sm-12">
<form class="form" name="form" ng-submit="login(form)" novalidate>

<div class="form-group">
<label>Email</label>

<input type="text" name="email" class="form-control" ng-model="user.email">
<input type="email" name="email" class="form-control" ng-model="user.email" required>
</div>

<div class="form-group">
<label>Password</label>

<input type="password" name="password" class="form-control" ng-model="user.password">
<input type="password" name="password" class="form-control" ng-model="user.password" required>
</div>

<div class="form-group has-error">
<p class="help-block" ng-show="form.email.$error.required && form.password.$error.required && submitted">
Please enter your email and password.
</p>
<p class="help-block" ng-show="form.email.$error.email && submitted">
Please enter a valid email.
</p>

<p class="help-block">{{ errors.other }}</p>
</div>

Expand All @@ -37,7 +42,6 @@ <h1>Login</h1>
</a>
</div>


<hr>
<div>
<a class="btn btn-google-plus" href="" ng-click="loginOauth('google')">
Expand All @@ -51,4 +55,4 @@ <h1>Login</h1>
</div>
</div>
<hr>
</div>
</div>
22 changes: 5 additions & 17 deletions client/app/account/login/login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,22 @@
$btnText: #fff;
$btnTextAlt: #000;

$btnFacebookBackground: #3B5998;
$btnFacebookBackgroundHighlight: #133783;

$btnTwitterBackground: #2daddc;
$btnTwitterBackgroundHighlight: #0271bf;

$btnGithubBackground: #fafafa;
$btnGithubBackgroundHighlight: #ccc;

$btnGooglePlusBackground: #dd4b39;
$btnGooglePlusBackgroundHighlight: #c53727;

$btnGithubBackground: #fafafa;
$btnGithubBackgroundHighlight: #ccc;

// Social buttons
// --------------------------------------------------

.btn-facebook {
@include button-variant($btnText, $btnFacebookBackgroundHighlight, $btnFacebookBackgroundHighlight);
}

.btn-twitter {
@include button-variant($btnText, $btnTwitterBackground, $btnTwitterBackgroundHighlight);
}

.btn-google-plus {
@include button-variant($btnText, $btnGooglePlusBackground, $btnGooglePlusBackgroundHighlight);
}
.btn-github {
@include button-variant($btnTextAlt, $btnGithubBackground, $btnGithubBackgroundHighlight);
}

.btn-google-plus {
@include button-variant($btnText, $btnGooglePlusBackground, $btnGooglePlusBackgroundHighlight);
}
2 changes: 1 addition & 1 deletion client/app/account/settings/settings.controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

angular.module('fullstackDemoApp')
angular.module('demoApp')
.controller('SettingsCtrl', function ($scope, User, Auth) {
$scope.errors = {};

Expand Down
10 changes: 7 additions & 3 deletions client/app/account/signup/signup.controller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

angular.module('fullstackDemoApp')
.controller('SignupCtrl', function ($scope, Auth, $location) {
angular.module('demoApp')
.controller('SignupCtrl', function ($scope, Auth, $location, $window) {
$scope.user = {};
$scope.errors = {};

Expand Down Expand Up @@ -30,4 +30,8 @@ angular.module('fullstackDemoApp')
});
}
};
});

$scope.loginOauth = function(provider) {
$window.location.href = '/auth/' + provider;
};
});
13 changes: 12 additions & 1 deletion client/app/account/signup/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,18 @@ <h1>Sign up</h1>
Login
</a>
</div>

<hr>
<div>
<a class="btn btn-google-plus" href="" ng-click="loginOauth('google')">
<i class="fa fa-google-plus"></i> Connect with Google+
</a>
<a class="btn btn-twitter" href="" ng-click="loginOauth('twitter')">
<i class="fa fa-twitter"></i> Connect with Twitter
</a>
</div>
</form>
</div>
</div>
</div>
<hr>
</div>
Loading

0 comments on commit 118f576

Please sign in to comment.