Skip to content

Commit

Permalink
Merge branch 'feature/passport' of https://github.com/jonniespratley/…
Browse files Browse the repository at this point in the history
…angular-cms into feature/passport

Conflicts:
	routes/rest.js
up
  • Loading branch information
jonniespratley committed Dec 8, 2014
2 parents d621dbb + 2a50fda commit 10efe3e
Show file tree
Hide file tree
Showing 13 changed files with 617 additions and 90 deletions.
68 changes: 42 additions & 26 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var serverEndpoint = 'http://localhost:8181';
var proxyConfig = {
proxy: {
forward: {
'/socket.io/*': serverEndpoint,
'/socket.io': serverEndpoint,
'/api': serverEndpoint
}
Expand All @@ -36,8 +37,7 @@ module.exports = function (grunt) {
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);

// Define the configuration for all the tasks
grunt.initConfig({
var GruntConfig = {

// Project settings
yeoman: {
Expand All @@ -54,11 +54,11 @@ module.exports = function (grunt) {
tasks: ['newer:coffee:dist']
},
coffeeTest: {
files: ['test/spec/{,**/}*.{coffee,litcoffee,coffee.md}'],
files: ['test/spec/{,**/}*.{coffee,litcoffee,coffee.md}'],
tasks: ['coffee:test', 'newer:coffee:test', 'karma:unit']
},
coffeeProtractorTest: {
files: ['test/protractor/{,**/}*.{coffee,litcoffee,coffee.md}'],
files: ['test/protractor/{,**/}*.{coffee,litcoffee,coffee.md}'],
tasks: ['coffee:test', 'newer:coffee:test', 'protractor']
},
compass: {
Expand Down Expand Up @@ -93,7 +93,8 @@ module.exports = function (grunt) {
hostname: '127.0.0.1',
livereload: 35729,
middleware: function (connect, options) {
return [require('json-proxy').initialize(proxyConfig),
return [
require('json-proxy').initialize(proxyConfig),
mountFolder(connect, '.grunt'),
mountFolder(connect, '.tmp')
];
Expand All @@ -104,8 +105,9 @@ module.exports = function (grunt) {
open: true,
base: ['.tmp', '<%= yeoman.app %>'],
middleware: function (connect, options) {
return [require('json-proxy').initialize(proxyConfig),
mountFolder(connect, '.tmp'),
return [
require('json-proxy').initialize(proxyConfig),
mountFolder(connect, '.tmp'),
mountFolder(connect, 'app')
];
}
Expand All @@ -122,7 +124,8 @@ module.exports = function (grunt) {
livereload: false,
base: '<%= yeoman.dist %>',
middleware: function (connect, options) {
return [require('json-proxy').initialize(proxyConfig),
return [
require('json-proxy').initialize(proxyConfig),
mountFolder(connect, 'dist')
];
}
Expand Down Expand Up @@ -269,9 +272,11 @@ module.exports = function (grunt) {
rev: {
dist: {
files: {
src: ['<%= yeoman.dist %>/scripts/{,*/}*.js', '<%= yeoman.dist %>/styles/{,*/}*.css',
src: [
'<%= yeoman.dist %>/scripts/{,*/}*.js', '<%= yeoman.dist %>/styles/{,*/}*.css',
//'<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
'<%= yeoman.dist %>/styles/fonts/*']
'<%= yeoman.dist %>/styles/fonts/*'
]
}
}
},
Expand Down Expand Up @@ -340,7 +345,7 @@ module.exports = function (grunt) {
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
*/
*/

},
files: [
Expand Down Expand Up @@ -406,11 +411,13 @@ module.exports = function (grunt) {
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: ['*.{ico,png,txt}', '.htaccess',
src: [
'*.{ico,png,txt}', '.htaccess',
//'bower_components/**/*',
'scripts/libs/*',
'images/{,*/}*.{webp}',
'fonts/*']
'fonts/*'
]
},
{
expand: true,
Expand All @@ -430,17 +437,22 @@ module.exports = function (grunt) {

// Run some tasks in parallel to speed up the build process
concurrent: {
server: ['coffee:dist',
server: [
'coffee:dist',
// 'compass:server',
'ngtemplates', 'copy:styles'],
test: ['coffee',
'ngtemplates', 'copy:styles'
],
test: [
'coffee',
// 'compass',
'copy:styles'],
'copy:styles'
],
dist: [
'coffee',
// 'compass:dist',
'ngtemplates',
'copy:styles', 'svgmin', 'htmlmin']
'copy:styles', 'svgmin', 'htmlmin'
]
},

// By default, your `index.html`'s <!-- Usemin block --> will take care of
Expand Down Expand Up @@ -569,8 +581,7 @@ module.exports = function (grunt) {
options: {
keepAlive: true, // If false, the grunt process stops when the test fails.
noColor: false, // If true, protractor will not use colors in its output.
args: {
}
args: {}
},
test: {
options: {
Expand All @@ -580,7 +591,6 @@ module.exports = function (grunt) {
}
},


//Coveralls code coverage
coveralls: {
options: {
Expand All @@ -605,7 +615,10 @@ module.exports = function (grunt) {
]
}
}
});
};

// Define the configuration for all the tasks
grunt.initConfig(GruntConfig);

grunt.registerTask('serve', function (target) {
if (target === 'dist') {
Expand All @@ -624,16 +637,19 @@ module.exports = function (grunt) {
grunt.task.run(['clean:server', 'concurrent:test', 'autoprefixer', 'connect:test']);
if (target === 'e2e') {
return grunt.task.run(['karma', 'protractor_webdriver', 'protractor', 'coveralls']);
} else if(target === 'server'){
} else if (target === 'server') {
return grunt.task.run(['coffee:test', 'mochaTest']);
} else {
return grunt.task.run(['karma:unit', 'coveralls']);
}
});

grunt.registerTask('ptor', ['coffee:test', 'protractor_webdriver', 'protractor']);
grunt.registerTask('build-docs', [ 'useminPrepare', 'autoprefixer', 'concat', 'ngmin']);
grunt.registerTask('build', ['clean:dist', 'useminPrepare', 'concurrent:dist', 'autoprefixer', 'concat', 'ngmin', 'copy:dist', /*'cdnify',*/ 'cssmin', 'uglify', 'rev', 'usemin']);
grunt.registerTask('ptor', ['coffee:test', 'protractor_webdriver', 'protractor']);
grunt.registerTask('build-docs', ['useminPrepare', 'autoprefixer', 'concat', 'ngmin']);
grunt.registerTask('build', [
'clean:dist', 'useminPrepare', 'concurrent:dist', 'autoprefixer', 'concat', 'ngmin', 'copy:dist', /*'cdnify',*/
'cssmin', 'uglify', 'rev', 'usemin'
]);

grunt.registerTask('docs', ['coffee', 'ngdocs', 'connect:docs', 'watch:ngdocs']);
grunt.registerTask('default', ['newer:jshint', 'test', 'build']);
Expand Down
52 changes: 34 additions & 18 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,44 @@
ga('send', 'pageview');
</script>


<script src="/socket.io/socket.io.js"></script>
<!-- bower:js -->


<!-- build:js scripts/plugins.js -->
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/jquery-ui/ui/jquery-ui.js"></script>
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/es5-shim/es5-shim.js"></script>
<script src="bower_components/json3/lib/json3.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>

<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-ui-utils/ui-utils.js"></script>
<script src="bower_components/angular-strap/dist/angular-strap.min.js"></script>
<script src="bower_components/angular-strap/dist/angular-strap.tpl.min.js"></script>
<script src="bower_components/blueimp-tmpl/js/tmpl.js"></script>
<script src="bower_components/blueimp-load-image/js/load-image.js"></script>
<script src="bower_components/blueimp-load-image/js/load-image-ios.js"></script>
<script src="bower_components/blueimp-load-image/js/load-image-orientation.js"></script>
<script src="bower_components/blueimp-load-image/js/load-image-meta.js"></script>
<script src="bower_components/blueimp-load-image/js/load-image-exif.js"></script>
<script src="bower_components/blueimp-load-image/js/load-image-exif-map.js"></script>
<script src="bower_components/blueimp-canvas-to-blob/js/canvas-to-blob.js"></script>
<script src="bower_components/jquery-file-upload/js/cors/jquery.postmessage-transport.js"></script>
<script src="bower_components/jquery-file-upload/js/cors/jquery.xdr-transport.js"></script>
<script src="bower_components/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload-process.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload-validate.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload-image.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload-audio.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload-video.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload-ui.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload-jquery-ui.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.fileupload-angular.js"></script>
<script src="bower_components/jquery-file-upload/js/jquery.iframe-transport.js"></script>
<script src="bower_components/jquery-ui/ui/jquery-ui.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-form-gen/dist/angular-form-gen.js"></script>
<!-- endbower -->
<!-- endbuild -->
<!-- Dependent libs -->
Expand All @@ -111,16 +137,6 @@
<script src="scripts/libs/markdown.js"></script>


<!-- build:js scripts/modules.js -->
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-strap/dist/angular-strap.min.js"></script>
<script src="bower_components/angular-strap/dist/angular-strap.tpl.min.js"></script>
<script src="bower_components/angular-ui-utils/ui-utils.js"></script>
<!-- endbuild -->

<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/config.js"></script>
Expand Down
1 change: 1 addition & 0 deletions app/scripts/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ app = angular.module('angularCmsApp', [
'ngRoute'
'ngAnimate'
'mgcrea.ngStrap'
'fg'
#'cms.Templates'
])
.config ($routeProvider) ->
Expand Down
Loading

0 comments on commit 10efe3e

Please sign in to comment.