Skip to content

Commit

Permalink
project init
Browse files Browse the repository at this point in the history
  • Loading branch information
HVNT committed Sep 16, 2015
1 parent 56419f5 commit 2d40608
Show file tree
Hide file tree
Showing 75 changed files with 4,650 additions and 9 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Created by .ignore support plugin (hsz.mobi)
.DS_STORE
.idea
.sass-cache
.tmp

log
node_modules
bower_components
tmp

src/index.html
src/core/styles/main.css
src/vendor/
src/app/app.templates.js

307 changes: 307 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
'use strict';
var path = require('path');

module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

grunt.initConfig({
config: {
app: 'src',
stage: '.tmp',
dist: 'build'
},
env: {
local: {ENV: 'local'},
mock: {ENV: 'mock'},
dev: {ENV: 'development'},
test: {ENV: 'test'},
stage: {ENV: 'stage'},
demo: {ENV: 'mock'},
prod: {ENV: 'production'}
},
preprocess: {
index: {
src: '<%= config.app %>/index.html.template',
dest: '<%= config.app %>/index.html'
}
},
watch: {
scss: {
files: [
'<%= config.app %>/core/**/*.{scss,sass}',
'<%= config.app %>/app/**/*.{scss,sass}',
'<%= config.app %>/submodule/**/*.{scss,sass}'
],
tasks: ['compass:dev']
},
index: {
files: ['<%= config.app %>/index.html.template'],
tasks: ['preprocess']
},
html: {
files: [
'<%= config.app %>/app/**/*.html',
'<%= config.app %>/core/**/*.html'
],
tasks: ['ngtemplates:build']
}
},
concurrent: {
options: {
logConcurrentOutput: true
},
watch: {
tasks: ['watch:scss', 'watch:index', 'watch:html']
}
},
clean: {
options: {
dot: true
},
dist: {
files: [
{
src: [
'<%= config.dist%>'
]
}
]
},
stage: {
files: [
{
src: [
'<%= config.stage%>'
]
}
]
}
},
compass: {
prod: {
options: {
debugInfo: false,
outputStyle: 'compressed',
config: 'config.rb'
}
},
dev: {
options: {
debugInfo: false,
outputStyle: 'compressed',
config: 'config.rb'
}
}
},
copy: {
toDist: {
files: [
{
expand: true,
dot: true,
cwd: '<%= config.app %>',
dest: '<%= config.dist %>',
src: [
'index.html',
'submodule/patterns/**/*.{js}',
'submodule/ckeditor/dev/builder/release/ckeditor/**/*',
'vendor/**/*.{html,otf,eot,svg,ttf,woff,woff2}',
'assets/**/*'
]
},
{
expand: true,
dot: true,
cwd: '<%= config.stage %>',
dest: '<%= config.dist %>',
src: ['assets/**/*']
}
]
}
},
express: {
all: {
options: {
port: 9000,
bases: './src',
server: './server.js'
}
}
},
uglify: {
options: {
mangle: true,
beautify: false
}
},
karma: {
unit: {
configFile: 'config/karma-unit.config.js',
singleRun: true
}
},
useminPrepare: {
html: '<%= config.app %>/index.html',
options: {
dest: '<%= config.stage%>'
}
},
usemin: {
html: '<%= config.app %>/index.html',
options: {
dest: '<%= config.stage %>',
assetsDirs: ['<%= config.stage %>']
}
},
filerev: {
options: {
algorithm: 'md5',
length: 8
},
assets: {
src: '<%= config.stage %>/assets/**/*.{js,css}'
}
},
ngAnnotate: {
buildjs: {
files: [
{
expand: true,
cwd: '<%= config.stage%>/concat/assets/js/',
src: 'build.js',
dest: '<%= config.stage%>/concat/assets/js/'
}
]
}
},
ngtemplates: {
build: {
cwd: '<%= config.app %>',
src: [
'app/**/*.html',
'core/**/*.html'
],
dest: '<%= config.app %>/app/app.templates.js',
options: {
module: 'rv.app',
prefix: '/',
htmlmin: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}
}
}
},
compress: {
build: {
options: {
archive: 'mozart-build.zip'
},
files: [
{
src: ['<%= config.dist%>/**']
}
]
}
},
http_upload: {
dev: {
options: {
url: 'https://deploy:[email protected]/Catcher/SaveIt.ashx',
method: 'POST',
rejectUnauthorized: false,
onComplete: function(data) {
console.log('Response: ' + data);
}
},
src: 'mozart-build.zip',
dest: 'mozart-build'
}
}
});

grunt.registerTask('server', [
'preprocess',
'compass:dev',
'express',
'concurrent:watch'
]);

grunt.registerTask('build', [
'preprocess',
'clean:dist',
'compass:dev',
'ngtemplates:build',
'useminPrepare',
'concat:generated',
'ngAnnotate',
'cssmin:generated',
'uglify:generated',
'filerev',
'usemin',
'copy:toDist',
'compress:build',
'clean:stage'
]);

grunt.registerTask('develop.local', [
'ngtemplates:build',
'env:local',
'server'
]);

grunt.registerTask('develop.mock', [
'ngtemplates:build',
'env:mock',
'server'
]);

grunt.registerTask('build.local', [
'env:local',
'build'
]);

grunt.registerTask('build.dev', [
'env:dev',
'build'
]);

grunt.registerTask('build.test', [
'env:test',
'build'
]);

grunt.registerTask('build.stage', [
'env:stage',
'build'
]);

grunt.registerTask('build.demo', [
'env:demo',
'build'
]);

grunt.registerTask('build.prod', [
'env:prod',
'build'
]);

grunt.registerTask('deploy.dev', [
'env:dev',
'build',
'http_upload:dev'
]);

grunt.registerTask('deploy.prod', [
'env:prod',
'build',
'http_upload:dev'
]);
};
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
# GTNewsDev - Web App for GT Sr. Design project
p1webclient
===========
Web App Client

#--> LOGIN AS 'bob' <--

This is because we are currently hardcoding groups to username 'bob' for our mock backend. Or like groups 'bob' is a part of. You can login as other people, there just won't be any messages created (because we created them ourselves in our mock backend).

The mock backend can be found in mock.js if you want to see some specifics on implementation and how we are supporting the API to the best of our ability.

#To get project up and running:
You need to have node, npm, bower, sass, ruby installed.

Then enter the following commands:
git clone [email protected]:HVNT/GTNewsDev.git
gem install animation --pre
npm install
bower install
grunt develop.mock
you need to have node, npm, bower, sass, ruby installed.

mkdir p1webclient

git clone

gem install animation --pre

npm install

bower install

grunt develop.mock


#Deliverable

For the final deliverable, the web client is still using the mock back-end as the server is still not functioning entirely properly. We could not get messages to work through the server or documents, so we have decided to show that the front-end client is functioning with all features in tact.

To make things a bit easier, we also changed a few endpoints in our mock back-end to take advantage of the body of a POST request instead of using query params.
Loading

0 comments on commit 2d40608

Please sign in to comment.