Skip to content

Commit

Permalink
Resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Dec 11, 2014
2 parents 5017d7a + 1606036 commit 8a7b1d0
Show file tree
Hide file tree
Showing 107 changed files with 5,676 additions and 1,070 deletions.
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ node_js:

# Karma requires a specific version due to dependency issues.
before_install:
- npm install --quiet -g karma@0.10.10
- npm install --quiet -g karma codeclimate-test-reporter

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm install --quiet -g grunt-cli bower
- bower install

script: grunt

script:
- grunt
- coverage=$(ls -d coverage/*/)
- echo "$coverage"
- codeclimate < "${coverage}lcov.info"
env:
global:
# Code climate token encypted with travis gem (travis encrypt CODECLIMATE_REPO_TOKEN=fdf...)
secure: SAZjrjbYfihqvEsZLbyTuZzquiwgk3oIgJHwxqVwx+UWhQ8bZTRWKnsEhJXgCqNryK1C+HQMVgI1lWdnsjY/qTIPbJ0Ep8zRg+SGIijsUWS0iA22EFA877/xAzqVY0Elplc0hCwd51EFnohlB4A9RjdBV4hl+7FAnEdoN9s+YmE=
80 changes: 49 additions & 31 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
var modRewrite = require('connect-modrewrite'),
path = require('path'),
_ = require('lodash');


module.exports = function (grunt) {

// bit of bullshit to ensure the build fails for missing files in the concat task
// note this overrides normal logging! not cool.
// These problems (failing on missing files) are expected to be resolved in grunt 0.5
//grunt.log.oldWarn = grunt.log.warn;
//grunt.log.warn = grunt.warn;
var modRewrite = require('connect-modrewrite'),
gzipStatic = require('connect-gzip-static'),
path = require('path'),
_ = require('lodash');


/**
* Load required Grunt tasks. These are installed based on the versions listed
Expand All @@ -34,7 +29,14 @@ module.exports = function (grunt) {
/**
* Load in our build configuration file.
*/
var userConfig = require('./build.config.js');
var userConfig = require('./buildConfig/build.config.js');

/**
* Load in the special vendor template.
*/
var processVendorJs =
require("./buildConfig/vendorTemplateProcessing.js")
(grunt, "./buildConfig/vendor.wrapper", "window.bawApp.externalsCallback", userConfig.vendor_files.jsWrapWithModule);


/**
Expand Down Expand Up @@ -122,7 +124,7 @@ module.exports = function (grunt) {
//after: "2013-09-05T10:18:39.4492679+10:00",
//before: "now",
dest: 'CHANGELOG.md',
template: 'changelog.tpl'
template: 'buildConfig/changelog.tpl'
}
},

Expand Down Expand Up @@ -224,7 +226,7 @@ module.exports = function (grunt) {
},
build_appjs: {
options: {
processContent: function (content, srcPath) {
process: function (content, srcPath) {
// if srcPath contain .tpl.js
// for now since the angular templates use tpl as well,
// we'll cheat and just use a direct file reference
Expand All @@ -249,6 +251,9 @@ module.exports = function (grunt) {
]
},
build_vendorjs: {
options: {
process: processVendorJs
},
files: [
{
src: [ '<%= vendor_files.js %>' ],
Expand Down Expand Up @@ -302,12 +307,16 @@ module.exports = function (grunt) {
},
nonull: true,
src: [
'<%= vendor_files.js %>',
'module.prefix',
(function() {
return userConfig.vendor_files.js.map(function(file) {
return userConfig.build_dir + "/" + file;
});
}()),
'buildConfig/module.prefix',
'<%= build_dir %>/src/**/*.js',
'<%= html2js.app.dest %>',
'<%= html2js.common.dest %>',
'module.suffix'
'buildConfig/module.suffix'
],
dest: '<%= compile_dir %>/assets/<%= pkg.name %>-<%= pkg.version %>.js'
}
Expand Down Expand Up @@ -339,7 +348,7 @@ module.exports = function (grunt) {
banner: '<%= meta.banner %>'
},
files: {
'<%= concat.compile_js.dest %>': '<%= concat.compile_js.dest %>'
"<%= concat.compile_js.dest %>": '<%= concat.compile_js.dest %>'
}
}
},
Expand Down Expand Up @@ -434,11 +443,11 @@ module.exports = function (grunt) {
},

/**
* These are the templates from `src/common`.
* These are the templates from `src/common` or `src/components`.
*/
common: {
options: {
base: 'src/common'
base: 'src'
},
src: [ '<%= app_files.ctpl %>' ],
dest: '<%= build_dir %>/templates-common.js'
Expand Down Expand Up @@ -526,11 +535,13 @@ module.exports = function (grunt) {
options: {
hostname: '*',
port: 8080,
base: '<%= build_dir %>',
base: './<%= build_dir %>',
debug: true,
livereload: true,
//keepalive: true,
middleware: function (connect, options) {

grunt.log.writeln(options.base);

return [
modRewrite([

Expand All @@ -555,12 +566,20 @@ module.exports = function (grunt) {
// from there, angular deals with the route information
'!(\\/[^\\.\\/\\?]+\\.\\w+) / [L]'
]),

// disable all caching
function(req, res, next) {
req.headers['if-none-match'] = 'no-match-for-this';
next();
},

// this specifies that the build_dir, ('build') is a static directory where content
// will be served from.
connect.static(options.base),
//connect.static(options.base[0]),
gzipStatic(options.base[0])

// for source maps
connect.static(__dirname)
//connect.static(__dirname)
];
}
}
Expand Down Expand Up @@ -646,10 +665,6 @@ module.exports = function (grunt) {
/**
* When the CSS files change, we need to compile and minify them.
*/
// less: {
// files: [ 'src/**/*.less' ],
// tasks: [ 'recess:build' ]
// },
sass: {
files: [ 'src/**/*.scss' ],
tasks: ['sass:build', 'concat:build_css']
Expand Down Expand Up @@ -739,6 +754,7 @@ module.exports = function (grunt) {
var jsFiles = filterForJS(this.filesSrc).map(function (file) {
return file.replace(dirRE, '');
});

var cssFiles = filterForCSS(this.filesSrc).map(function (file) {
return file.replace(dirRE, '');
});
Expand Down Expand Up @@ -766,7 +782,7 @@ module.exports = function (grunt) {
grunt.renameTask('sass', 'sassReal');
grunt.registerTask('sassTemplate', 'Transforming sass file', function () {
var mainScss = grunt.config('app_files.sass');
var processedScss = path.join(path.dirname(mainScss), path.basename(mainScss, ".tpl.scss")) + ".processed.scss";
var processedScss = path.join(path.dirname(mainScss), path.basename(mainScss, ".tpl.scss")) + ".scss.processed";
grunt.config.set('app_files.processedSass', processedScss);

grunt.log.write("Temp file: " + processedScss);
Expand All @@ -785,19 +801,21 @@ module.exports = function (grunt) {

/**
* In order to avoid having to specify manually the files needed for karma to
* run, we use grunt to manage the list for us. The `karma/*` files are
* run, we use grunt to manage the list for us. The `buildConfig/karma-unit.tpl.js` files are
* compiled as grunt templates for use by Karma. Yay!
*/
grunt.registerMultiTask('karmaconfig', 'Process karma config templates', function () {
var jsFiles = filterForJS(this.filesSrc);
var usePhantomJs = grunt.config('usePhantomJs');
var vendorFiles = grunt.config("vendor_files.js");

grunt.file.copy('karma/karma-unit.tpl.js', grunt.config('build_dir') + '/karma-unit.js', {
grunt.file.copy('buildConfig/karma-unit.tpl.js', grunt.config('build_dir') + '/karma-unit.js', {
process: function (contents, path) {
return grunt.template.process(contents, {
data: {
usePhantomJs: usePhantomJs,
scripts: jsFiles
scripts: jsFiles,
vendorFiles: vendorFiles
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ baw-client

The AngularJS client for the bioacoustic workbench

[![Build Status](https://travis-ci.org/QutBioacoustics/baw-client.png)](https://travis-ci.org/QutBioacoustics/baw-client) [![Dependency Status](https://gemnasium.com/QutBioacoustics/baw-client.png)](https://gemnasium.com/QutBioacoustics/baw-client) [![Code Quality](https://d3s6mut3hikguw.cloudfront.net/github/QutBioacoustics/baw-client.png)](https://codeclimate.com/github/QutBioacoustics/baw-client)
[![Build Status](https://travis-ci.org/QutBioacoustics/baw-client.png)](https://travis-ci.org/QutBioacoustics/baw-client) [![Dependency Status](https://gemnasium.com/QutBioacoustics/baw-client.png)](https://gemnasium.com/QutBioacoustics/baw-client) [![Code Quality](https://d3s6mut3hikguw.cloudfront.net/github/QutBioacoustics/baw-client.png)](https://codeclimate.com/github/QutBioacoustics/baw-client) [![Code Coverage](http://img.shields.io/codeclimate/coverage/github/QutBioacoustics/baw-client.svg)](https://codeclimate.com/github/QutBioacoustics/baw-client)
---
## Install instructions

Expand Down
42 changes: 23 additions & 19 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
{
"name": "ng-boilerplate",
"version": "0.0.17",
"name": "baw-client",
"version": "0.12.0",
"devDependencies": {
"angular": "1.2.x",
"angular-mocks": "~1.2.x",
"angular-route": "~1.2.x",
"angular-resource": "~1.2.x",
"angular-bootstrap": "~0.11.0",
"angular-ui-router": "~0.2.x",
"angular": "1.3.x",
"angular-bootstrap": "~0.12.0",
"angular-growl-v2": "~0.7.0",
"angular-local-storage": "~0.1.x",
"angular-mocks": "~1.3.x",
"angular-resource": "~1.3.x",
"angular-route": "~1.3.x",
"angular-sanitize": "~1.3.x",
"angular-tags": "git://github.com/boneskull/angular-tags.git#master",
"angular-ui-utils": "latest",
"sass-bootstrap": "3.0.2",
"bowser": "0.7.x",
"d3": "~3.4.x",
"draggabilly": "~1.1.x",
"hint.css": "https://github.com/chinchang/hint.css.git",
"humanize-duration": "~2.1.x",
"jasmine-expect": "1.x",
"jquery-ui": "~1.11.x",
"lodash": "~2.4.x",
"modernizr": "~2.8.x",
"jquery-ui": "~1.10.3",
"momentjs": "~2.6.x",
"jasmine-matchers": "https://github.com/JamieMason/Jasmine-Matchers.git#develop",
"momentjs": "~2.8.x",
"objectdiff": "https://github.com/NV/objectDiff.js.git",
"lodash": "~2.4.x",
"angular-tags": "git://github.com/boneskull/angular-tags.git#master",
"angular-sanitize": "~1.2.x",
"draggabilly": "~1.1.x"
"sass-bootstrap": "3.0.2"
},
"dependencies": {},
"private": true,
"resolutions": {
"angular": ">1.2.6"
},
"private": true
"angular": "1.3.x"
}
}
Loading

0 comments on commit 8a7b1d0

Please sign in to comment.