Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Commit

Permalink
Move to Firebase hosting. Remove server code. (#102)
Browse files Browse the repository at this point in the history
* add view for event lists

* use /event as path prefix, allow /:tag as url

* fix redirecting tags

* only show 100 upcoming events

* update tag data

* update(eventList): wrap large event lists in performant `md-virtual-repeat`

Fix some styling issues (more to do still)
Refactor routing, components, and asset locations.
Remove empty files.
Added in some one time bindings for performance.
Filter in controller as much as possible for performance.

* fix(tests): fix issues caused by refactoring

* fix(jshint): fix JSHint error that was breaking the server build

Use minified version of ngGeolocation.
Bump version of ngGeolocation.

* update(karma): Remove references to old libraries.

* update(tag): always keep tag data in $rootScope

Sometimes this was being stored in the $scope which wasn't always visible and caused duplication of data.
Update to Angular Material 1.0.0.

* fix(main): clicking nearby events doesn't open event

* refactor(app): remove all server code. configure Firebase hosting.

* fix(main): put back 2-way binding to fix a number of syncing issues.

update dependencies
fix grunt copy task to copy image assets to `dist/` properly

* update(tests): use NodeJS 6.x in Travis-CI.

Remove old dependencies from server.

Fixes #55.

* fix(tests): remove useless tests! fix main test.

fix JSCS failures
remove excess server requests and more code that assumes that the URL will be prefixed

* update(readme,config): update README

add BrowserSync config for use with lite-server
add `local.env.sample.js` with instructions for configuring keys locally
remove UrlShortener docs
update local dev and production deployment steps
update License years

* fix(map): using back button causes map to stay centered in the wrong spot

* fix(routing): invalid event URLs leave the user on a blank page

* fix(map): marker links don't work

* update(map): update to latest angular-google-maps and Google Maps SDK (3.24)

* fix(map): event list page isn't loading events for the tag properly

also fixed repeated items in md-virtual-repeat caused by one-time bindings
fix exception on event page if event doesn't have geo data

* update(readme): add important build step to deployment guide

* fix(tests): update text to work with the fix to tagged events page

i.e. it should ask the Hub for upcoming events only
  • Loading branch information
Splaktar authored Aug 28, 2016
1 parent 55b3cc1 commit be8ce38
Show file tree
Hide file tree
Showing 57 changed files with 450 additions and 1,609 deletions.
3 changes: 0 additions & 3 deletions .dockerignore

This file was deleted.

5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "firefly-1c312"
}
}
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
node_modules
public
.tmp
.sass-cache
.idea
client/bower_components
bower_components
dist
/server/config/local.env.js
local.env.js
*.log
5 changes: 0 additions & 5 deletions .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
"disallowSpacesInsideArrayBrackets": null,
"disallowSpacesInsideParentheses": true,

"validateJSDoc": {
"checkParamNames": true,
"requireParamTypes": null
},

"disallowMultipleLineBreaks": true,

"disallowCommaBeforeLineBreak": null,
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: node_js
node_js:
- '0.12'
- '6'
before_script:
- npm install -g bower grunt-cli
- bower install
services: mongodb
2 changes: 1 addition & 1 deletion .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
"css"
]
}
}
}
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

152 changes: 6 additions & 146 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
module.exports = function (grunt) {
var opn = require('opn'); // jshint ignore:line
var localConfig;
try {
localConfig = require('./server/config/local.env');
localConfig = require('./local.env');
} catch (e) {
localConfig = {};
}
const DOMAIN = localConfig.DOMAIN || process.env.DOMAIN || 'localhost';
const PORT = localConfig.PORT || process.env.PORT || 9000;
const HUB_IP = localConfig.HUB_IP || 'https://hub.gdgx.io/';

// Load grunt tasks automatically, when needed
require('jit-grunt')(grunt, {
express: 'grunt-express-server',
useminPrepare: 'grunt-usemin',
ngtemplates: 'grunt-angular-templates',
cdnify: 'grunt-google-cdn',
Expand All @@ -35,22 +32,6 @@ module.exports = function (grunt) {
client: require('./bower.json').appPath || 'client',
dist: 'dist'
},
express: {
options: {
port: PORT
},
dev: {
options: {
script: 'server/app.js',
debug: true
}
},
prod: {
options: {
script: 'dist/server/app.js'
}
}
},
watch: {
injectJS: {
files: [
Expand All @@ -67,10 +48,6 @@ module.exports = function (grunt) {
],
tasks: ['injector:css']
},
mochaTest: {
files: ['server/**/*.spec.js'],
tasks: ['env:test', 'mochaTest']
},
jsTest: {
files: [
'<%= yeoman.client %>/{app,components}/**/*.spec.js',
Expand All @@ -93,16 +70,6 @@ module.exports = function (grunt) {
options: {
livereload: true
}
},
express: {
files: [
'server/**/*.{js,json}'
],
tasks: ['express:dev', 'wait'],
options: {
livereload: true,
nospawn: true //Without this option specified express won't be reloaded
}
}
},

Expand All @@ -112,12 +79,6 @@ module.exports = function (grunt) {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
server: {
options: {
jshintrc: 'server/.jshintrc'
},
src: [ 'server/{,*/}*.js']
},
all: [
'<%= yeoman.client %>/{app,components}/**/*.js',
'!<%= yeoman.client %>/{app,components}/**/*.spec.js',
Expand Down Expand Up @@ -154,12 +115,10 @@ module.exports = function (grunt) {
'.tmp',
'<%= yeoman.dist %>/*',
'!<%= yeoman.dist %>/.git*',
'!<%= yeoman.dist %>/.openshift',
'!<%= yeoman.dist %>/Procfile'
]
}]
},
server: '.tmp'
}
},

// Add vendor prefixed styles
Expand All @@ -186,31 +145,6 @@ module.exports = function (grunt) {
}
},

// Use nodemon to run server in debug mode with an initial breakpoint
nodemon: {
debug: {
script: 'server/app.js',
options: {
nodeArgs: ['--debug-brk'],
env: {
PORT: PORT
},
callback: function (nodemon) {
nodemon.on('log', function (event) {
console.log(event.colour);
});

// opens browser on initial server start
nodemon.on('config:update', function () {
setTimeout(function () {
opn('http://localhost:' + PORT + '/debug?port=5858');
}, 500);
});
}
}
}
},

// Automatically inject Bower components into the app
wiredep: {
target: {
Expand Down Expand Up @@ -376,8 +310,8 @@ module.exports = function (grunt) {
'*.{ico,png,txt}',
'.htaccess',
'bower_components/**/*',
'assets/images/{,*/}*.{webp}',
'assets/fonts/**/*',
'app/assets/images/**/*',
'app/assets/fonts/**/*',
'index.html',
'.well-known/assetlinks.json'
]
Expand All @@ -386,13 +320,6 @@ module.exports = function (grunt) {
cwd: '.tmp/images',
dest: '<%= yeoman.dist %>/public/assets/images',
src: ['generated/*']
}, {
expand: true,
dest: '<%= yeoman.dist %>',
src: [
'package.json',
'server/**/*'
]
}]
},
styles: {
Expand All @@ -416,21 +343,12 @@ module.exports = function (grunt) {
remote: 'heroku',
branch: 'master'
}
},
openshift: {
options: {
remote: 'openshift',
branch: 'master'
}
}
},

// Run some tasks in parallel to speed up the build process
concurrent: {
server: [
],
test: [
],
test: [],
debug: {
tasks: [
'nodemon',
Expand All @@ -454,13 +372,6 @@ module.exports = function (grunt) {
}
},

mochaTest: {
options: {
reporter: 'spec'
},
src: ['server/**/*.spec.js']
},

protractor: {
options: {
configFile: 'protractor.conf.js'
Expand Down Expand Up @@ -542,57 +453,9 @@ module.exports = function (grunt) {
}, 1500);
});

grunt.registerTask('open', function () {
opn('http://localhost:' + PORT);
});

grunt.registerTask('express-keepalive', 'Keep grunt running', function() {
this.async();
});

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

if (target === 'debug') {
return grunt.task.run([
'clean:server',
'env:all',
'concurrent:server',
'injector',
'wiredep',
'autoprefixer',
'concurrent:debug'
]);
}

grunt.task.run([
'clean:server',
'env:all',
'concurrent:server',
'injector',
'wiredep',
'autoprefixer',
'express:dev',
'wait',
'open',
'watch'
]);
});

grunt.registerTask('test', function(target) {
if (target === 'server') {
return grunt.task.run([
'env:all',
'env:test',
'mochaTest'
]);
}

else if (target === 'client') {
if (target === 'client') {
return grunt.task.run([
'clean:server',
'env:all',
'concurrent:test',
'injector',
Expand All @@ -603,21 +466,18 @@ module.exports = function (grunt) {

else if (target === 'e2e') {
return grunt.task.run([
'clean:server',
'env:all',
'env:test',
'concurrent:test',
'injector',
'wiredep',
'autoprefixer',
'express:dev',
'protractor'
]);
}

else {
grunt.task.run([
'test:server',
'test:client'
]);
}
Expand Down
Loading

0 comments on commit be8ce38

Please sign in to comment.